]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
fix the pb with "Navigation using the mouse" (p.5.1.,T2.9_GUI SPECIFICATIONS) that...
authorpkv <pkv@opencascade.com>
Tue, 8 Nov 2005 08:43:24 +0000 (08:43 +0000)
committerpkv <pkv@opencascade.com>
Tue, 8 Nov 2005 08:43:24 +0000 (08:43 +0000)
src/VVTK/VVTK_InteractorStyle.cxx

index 36f89c885c988c254e5e92aefa2ea83cc25aa840..02343e4110a82a2621faf9715540ede1f1d1b51f 100644 (file)
@@ -85,14 +85,15 @@ VVTK_InteractorStyle
   myOtherPoint = myPoint = QPoint(x, y);
   if (ForcedState != VTK_INTERACTOR_STYLE_CAMERA_NONE) {
     startOperation(ForcedState);
-  } else {
-    if (ctrl)
-      startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
-    else {
-      if ( myIsMidButtonDown )
+  } 
+  else {
+    if (!(ctrl||shift)){
+      if (myIsMidButtonDown){
        startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
-      else
+      }
+      else{
        startOperation(VTK_INTERACTOR_STYLE_CAMERA_ROTATE);
+      }
     }
   }
   return;
@@ -107,16 +108,14 @@ VVTK_InteractorStyle
 {
   myIsMidButtonDown = true;
 
-  if (this->HasObserver(vtkCommand::MiddleButtonPressEvent)) 
-    {
-      this->InvokeEvent(vtkCommand::MiddleButtonPressEvent,NULL);
-      return;
-    }
+  if (this->HasObserver(vtkCommand::MiddleButtonPressEvent))  {
+    this->InvokeEvent(vtkCommand::MiddleButtonPressEvent,NULL);
+    return;
+  }
   this->FindPokedRenderer(x, y);
-  if (this->CurrentRenderer == NULL)
-    {
-      return;
-    }
+  if (this->CurrentRenderer == NULL)    {
+    return;
+  }
   myShiftState = shift;
   // finishing current viewer operation
   if (State != VTK_INTERACTOR_STYLE_CAMERA_NONE) {
@@ -128,10 +127,14 @@ VVTK_InteractorStyle
     startOperation(ForcedState);
   }
   else {
-    if ( myIsLeftButtonDown )
-      startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
-    else
-      startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
+    if (!(ctrl||shift)){
+      if ( myIsLeftButtonDown ){
+       startOperation(VTK_INTERACTOR_STYLE_CAMERA_ZOOM);
+      }
+      else{
+       startOperation(VTK_INTERACTOR_STYLE_CAMERA_PAN);
+      }
+    }
   }
 }