From 21f3c13c8abb46df68867c05374d75edd25661fa Mon Sep 17 00:00:00 2001 From: pkv Date: Tue, 8 Nov 2005 08:43:24 +0000 Subject: [PATCH] fix the pb with "Navigation using the mouse" (p.5.1.,T2.9_GUI SPECIFICATIONS) that uses the Salome standard behavior and New capability. --- src/VVTK/VVTK_InteractorStyle.cxx | 41 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 19 deletions(-) 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); + } + } } } -- 2.39.2