From ff220508d249ae2d51680167daac895f98148fb9 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 1 Dec 2017 11:37:29 +0300 Subject: [PATCH] refs #1458: disable chained panning on operations --- src/HYDROGUI/HYDROGUI_Operations.cxx | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) 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 ) { -- 2.39.2