From 13db960c7fe74ba81d3ebeb7ed68bc5b3d983ccd Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 5 Jul 2016 10:12:51 +0200 Subject: [PATCH] disconnect a signal/slot for ROI contours Avoid to call the function twice --- vv/vvToolROIManager.cxx | 2 ++ 1 file changed, 2 insertions(+) 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))); } //------------------------------------------------------------------------------ -- 2.45.1