]> Creatis software - clitk.git/blobdiff - vv/vvInteractorStyleNavigator.cxx
Debug RTStruct conversion with empty struc
[clitk.git] / vv / vvInteractorStyleNavigator.cxx
index 712e069672eb324d1f883a2a3e03bcebee8d0214..f3fc53befc9cc1e1edeec2d9093b3044d18dd5c6 100644 (file)
@@ -29,8 +29,6 @@
 #include <vtkRendererCollection.h>
 #include "clitkCommon.h"
 
-
-vtkCxxRevisionMacro(vvInteractorStyleNavigator, "DummyRevision");
 vtkStandardNewMacro(vvInteractorStyleNavigator);
 
 //----------------------------------------------------------------------------
@@ -90,14 +88,14 @@ void vvInteractorStyleNavigator::StartPick()
   if (this->State != VTKIS_NONE) {
     return;
   }
-  this->StartState(VTKIS_PICK);
+  this->StartState(VTKIS_PICK_NEW);
   this->InvokeEvent(vtkCommand::StartPickEvent, this);
 }
 
 //----------------------------------------------------------------------------
 void vvInteractorStyleNavigator::EndPick()
 {
-  if (this->State != VTKIS_PICK) {
+  if (this->State != VTKIS_PICK_NEW) {
     return;
   }
   this->InvokeEvent(vtkCommand::EndPickEvent, this);
@@ -117,7 +115,7 @@ void vvInteractorStyleNavigator::OnMouseMove()
     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
     break;
 
-  case VTKIS_PICK:
+  case VTKIS_PICK_NEW:
     this->FindPokedRenderer(x, y);
     this->Pick();
     this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
@@ -153,7 +151,7 @@ void vvInteractorStyleNavigator::OnEnter()
   case VTKIS_WINDOW_LEVEL:
     break;
 
-  case VTKIS_PICK:
+  case VTKIS_PICK_NEW:
     break;
 
   case VTKIS_PAN:
@@ -178,7 +176,7 @@ void vvInteractorStyleNavigator::OnLeave()
   case VTKIS_WINDOW_LEVEL:
     break;
 
-  case VTKIS_PICK:
+  case VTKIS_PICK_NEW:
     break;
 
   case VTKIS_PAN:
@@ -249,7 +247,10 @@ void vvInteractorStyleNavigator::OnLeftButtonDown()
 
   // Redefine this button to handle pick
   this->GrabFocus(this->EventCallbackCommand);
-  if (!this->Interactor->GetShiftKey() && !this->Interactor->GetControlKey()) {
+  if (this->Interactor->GetShiftKey()) {
+    this->OnMiddleButtonDown();
+  }
+  else if (!this->Interactor->GetControlKey()) {
     this->StartPick();
   }
 
@@ -265,12 +266,15 @@ void vvInteractorStyleNavigator::OnLeftButtonUp()
 {
   //  DD("OnLeftButtonUp");
   switch (this->State) {
-  case VTKIS_PICK:
+  case VTKIS_PICK_NEW:
     this->EndPick();
     if ( this->Interactor ) {
       this->ReleaseFocus();
     }
     break;
+  case VTKIS_PAN:
+    this->OnMiddleButtonUp();
+    break;
   }
 
   // Call parent to handle all other states and perform additional work