]> Creatis software - clitk.git/blobdiff - vv/vvToolROIManager.cxx
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / vv / vvToolROIManager.cxx
index 8b0a48753671fc735e6cfed736dae8d62bfda1d1..e1d2e5c534e2f586d45657d3911a14417d6e6641 100644 (file)
@@ -491,9 +491,7 @@ void vvToolROIManager::UpdateAllContours()
   for(unsigned int i=0; i<mROIList.size(); i++) {
     mROIActorsList[i]->Update();
   }
-  for(int i=0; i<mCurrentSlicerManager->GetNumberOfSlicers(); i++) {
-    mCurrentSlicerManager->GetSlicer(i)->Render();
-  }
+  mCurrentSlicerManager->Render();
 }
 //------------------------------------------------------------------------------
 
@@ -679,6 +677,8 @@ void vvToolROIManager::ChangeColor() {
                 mCurrentROIActor->GetROI()->GetDisplayColor()[1],
                 mCurrentROIActor->GetROI()->GetDisplayColor()[2]);
   QColor c = QColorDialog::getColor(color, this, "Choose the ROI color");
+  if (!c.isValid()) return;// User cancel
+
   mCurrentROIActor->GetROI()->SetDisplayColor(c.redF(), c.greenF(), c.blueF());
   mCurrentROIActor->UpdateColor();