]> Creatis software - clitk.git/commitdiff
VV panning: middlebutton = left button + shift
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Thu, 18 Oct 2012 07:37:37 +0000 (09:37 +0200)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Thu, 18 Oct 2012 07:37:37 +0000 (09:37 +0200)
- a change made specially for mac owners and their mice-without-middle-button issues... ;-)

vv/vvInteractorStyleNavigator.cxx

index 712e069672eb324d1f883a2a3e03bcebee8d0214..ac37a8fd22c95442157365a2a03ad3409d662ed1 100644 (file)
@@ -249,7 +249,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();
   }
 
@@ -271,6 +274,9 @@ void vvInteractorStyleNavigator::OnLeftButtonUp()
       this->ReleaseFocus();
     }
     break;
+  case VTKIS_PAN:
+    this->OnMiddleButtonUp();
+    break;
   }
 
   // Call parent to handle all other states and perform additional work