From: tbaudier Date: Tue, 5 Jul 2016 08:29:51 +0000 (+0200) Subject: disconnect a signal/slot for ROI X-Git-Tag: v1.4.0~18 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0d3391305e240b2cd0be9bc8dc574c498c087a93;p=clitk.git disconnect a signal/slot for ROI Avoid to call the function twice --- diff --git a/vv/vvToolROIManager.cxx b/vv/vvToolROIManager.cxx index cab86e6..4156934 100644 --- a/vv/vvToolROIManager.cxx +++ b/vv/vvToolROIManager.cxx @@ -716,6 +716,7 @@ void vvToolROIManager::OpacityChanged(int v) //------------------------------------------------------------------------------ void vvToolROIManager::AllVisibleROIToggled(int b) { + disconnect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int))); bool status = false; if ((mCheckBoxShowAll->checkState() == Qt::Checked) || (mCheckBoxShowAll->checkState() == Qt::PartiallyChecked)) status = true; @@ -727,6 +728,7 @@ void vvToolROIManager::AllVisibleROIToggled(int b) else mCheckBoxShowAll->setCheckState(Qt::Unchecked); mCheckBoxShow->setChecked(status); mCurrentSlicerManager->Render(); + connect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int))); } //------------------------------------------------------------------------------