From: asl Date: Mon, 20 Nov 2017 08:08:33 +0000 (+0300) Subject: refs #1324: patch for activation/deactivation modes on modules switch X-Git-Tag: v2.1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c33c6275a7037c61f53b5c9ce0a965ec034609bd;p=modules%2Fgui.git refs #1324: patch for activation/deactivation modes on modules switch --- diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 5b99ac06c..c30752036 100644 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -630,8 +630,18 @@ void OCCViewer_ViewWindow::activateZoom() void OCCViewer_ViewWindow::onPanning() { - myPanningByBtn = true; - activatePanning(); + OCCViewer_ViewManager* aMgr = dynamic_cast( getViewManager() ); + bool isChained = aMgr->isChainedOperations(); + bool isReset = ( myPanningByBtn && isChained ); + if( isReset ) + { + resetState(); + } + else + { + myPanningByBtn = true; + activatePanning(); + } } /*! @@ -1230,6 +1240,8 @@ void OCCViewer_ViewWindow::resetState() setTransformInProcess( false ); setTransformRequested( NOTHING ); + + myPanningByBtn = false; }