]> Creatis software - clitk.git/commitdiff
Force visilibty of base image on first click of him or one of his
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 30 May 2011 17:15:33 +0000 (19:15 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 30 May 2011 17:15:33 +0000 (19:15 +0200)
children

vv/vvMainWindow.cxx

index 8842b2d2343e0739ca204e3b7fe4435e8ff8466d..c3465c19f8a7d7276c0f51894efb304d6cc5223c 100644 (file)
@@ -1381,9 +1381,13 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column)
       mSlicerManagers[slicerManagerIndex]->UpdateSlicer(column-1, true);
       mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1);
       DisplaySliders(slicerManagerIndex, column-1);
-      if(clickedParentItem == clickedItem) {
-        // Toggle or force visibility if it was not on this branch so far
-        vis = !draw || !vis;
+      if(!draw) {
+        // We were not on this branch so far => force visibility
+        vis = true;
+      }
+      else if(clickedParentItem == clickedItem) {
+        // Toggle
+        vis =  !vis;
       }
       clickedSlicer->SetActorVisibility("image", 0, vis);
       clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0);