]> Creatis software - clitk.git/blobdiff - vv/vvSlicerManagerCommand.cxx
Added linked navigation (zoom and pan)
[clitk.git] / vv / vvSlicerManagerCommand.cxx
index 5b1ad270442ecce2dc4267400b5c4991b1775b03..068de40927ed7a5611d013ec21e945ed1a16ce06 100644 (file)
@@ -189,15 +189,14 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller,
           return;
         }
         if (KeyPress == "x") {
-         for(int i=0;i<SM->NumberOfSlicers();i++)
-         {
-          SM->RemoveActor("overlay",0);
-          SM->SetColorMap(0);
-          SM->Render();
-         }
-          return;
-       }
-       if (KeyPress == "u") {
+          for(int i=0; i<SM->NumberOfSlicers(); i++) {
+            SM->RemoveActor("overlay",0);
+            SM->SetColorMap(0);
+            SM->Render();
+          }
+          return;
+        }
+        if (KeyPress == "u") {
           this->SM->Reload();
           this->SM->Render();
           return;
@@ -300,6 +299,10 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller,
         mStartSlicer = -1;
       }
 
+      if (event == vtkCommand::EndInteractionEvent) {
+        this->SM->UpdateLinkedNavigation(this->SM->GetSlicer(VisibleInWindow),true);
+        return;
+      }
     }
     if (VisibleInWindow > -1) {
       this->SM->Activated();