From: pkv Date: Tue, 8 Nov 2005 08:43:24 +0000 (+0000) Subject: fix the pb with "Navigation using the mouse" (p.5.1.,T2.9_GUI SPECIFICATIONS) that... X-Git-Tag: TG-D5-38-2003_D2005-20-12~120 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=21f3c13c8abb46df68867c05374d75edd25661fa;p=modules%2Fvisu.git fix the pb with "Navigation using the mouse" (p.5.1.,T2.9_GUI SPECIFICATIONS) that uses the Salome standard behavior and New capability. --- diff --git a/src/VVTK/VVTK_InteractorStyle.cxx b/src/VVTK/VVTK_InteractorStyle.cxx index 36f89c88..02343e41 100644 --- a/src/VVTK/VVTK_InteractorStyle.cxx +++ b/src/VVTK/VVTK_InteractorStyle.cxx @@ -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); + } + } } }