From: asl Date: Fri, 1 Dec 2017 08:37:29 +0000 (+0300) Subject: refs #1458: disable chained panning on operations X-Git-Tag: v2.1.1__salome84~7^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ff220508d249ae2d51680167daac895f98148fb9;p=modules%2Fhydro.git refs #1458: disable chained panning on operations --- diff --git a/src/HYDROGUI/HYDROGUI_Operations.cxx b/src/HYDROGUI/HYDROGUI_Operations.cxx index 194e38a1..dfa569fa 100644 --- a/src/HYDROGUI/HYDROGUI_Operations.cxx +++ b/src/HYDROGUI/HYDROGUI_Operations.cxx @@ -88,7 +88,10 @@ #include -#include +#include +#include +#include +#include #include #include @@ -457,7 +460,33 @@ void HYDROGUI_Module::onOperation() const QAction* anAction = dynamic_cast( sender() ); int anId = actionId( anAction ); if( anId >= 0 ) + { + OCCViewer_ViewManager* mgr = dynamic_cast( + getApp()->viewManager( OCCViewer_Viewer::Type() ) ); + if( mgr ) + { + foreach( SUIT_ViewWindow* wnd, mgr->getViews() ) + { + OCCViewer_ViewFrame* vf = dynamic_cast( wnd ); + if( vf ) + { + for( int i=OCCViewer_ViewFrame::MAIN_VIEW; i<=OCCViewer_ViewFrame::TOP_RIGHT; i++ ) + { + OCCViewer_ViewWindow* iwnd = vf->getView(i); + if( iwnd ) + iwnd->resetState(); + } + } + else + { + OCCViewer_ViewWindow* ownd = dynamic_cast( wnd ); + if( ownd ) + ownd->resetState(); + } + } + } startOperation( anId ); + } if( anId==ShowHideArrows ) {