From: tbaudier Date: Tue, 5 Jul 2016 08:12:51 +0000 (+0200) Subject: disconnect a signal/slot for ROI contours X-Git-Tag: v1.4.0~19 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=13db960c7fe74ba81d3ebeb7ed68bc5b3d983ccd;p=clitk.git disconnect a signal/slot for ROI contours Avoid to call the function twice --- diff --git a/vv/vvToolROIManager.cxx b/vv/vvToolROIManager.cxx index 7a2324b..cab86e6 100644 --- a/vv/vvToolROIManager.cxx +++ b/vv/vvToolROIManager.cxx @@ -734,6 +734,7 @@ void vvToolROIManager::AllVisibleROIToggled(int b) //------------------------------------------------------------------------------ void vvToolROIManager::AllVisibleContourROIToggled(int b) { + disconnect(mContourCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleContourROIToggled(int))); bool status = false; if ((mContourCheckBoxShowAll->checkState() == Qt::Checked) || (mContourCheckBoxShowAll->checkState() == Qt::PartiallyChecked)) status = true; @@ -746,6 +747,7 @@ void vvToolROIManager::AllVisibleContourROIToggled(int b) else mContourCheckBoxShowAll->setCheckState(Qt::Unchecked); mContourCheckBoxShow->setChecked(status); mCurrentSlicerManager->Render(); + connect(mContourCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleContourROIToggled(int))); } //------------------------------------------------------------------------------