]> Creatis software - clitk.git/commitdiff
Remove signal/slot connection bug with Profile tool
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 2 Dec 2016 10:35:01 +0000 (11:35 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 2 Dec 2016 10:35:01 +0000 (11:35 +0100)
The bug occured after a click on Cancel during image selection

vv/vvToolProfile.cxx

index 6ebe1449703243b679570b0ff825115f589132d7..e0ebdf1c14f283e7795a54e4adfbecaec5cf0ce8 100644 (file)
@@ -363,6 +363,8 @@ void vvToolProfile::RemoveVTKObjects()
 { 
   if (mCurrentSlicerManager)
   {
+    connect(mCurrentSlicerManager, SIGNAL(callAddLandmark(float,float,float,float)), mCurrentSlicerManager, SLOT(AddLandmark(float,float,float,float)));
+
     for(int i=0;i<mCurrentSlicerManager->GetNumberOfSlicers(); i++) {
       mCurrentSlicerManager->GetSlicer(i)->GetRenderer()->RemoveActor(mLineActors[i]);
     }
@@ -382,8 +384,7 @@ void vvToolProfile::RemoveVTKObjects()
 bool vvToolProfile::close()
 { 
   //RemoveVTKObjects();
-  
-  connect(mCurrentSlicerManager, SIGNAL(callAddLandmark(float,float,float,float)), mCurrentSlicerManager, SLOT(AddLandmark(float,float,float,float)));
+
   return vvToolWidgetBase::close();
 }
 //------------------------------------------------------------------------------