From 4afb8eaa70013dca004e781836cba959b1efa097 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 13 Nov 2017 11:08:27 +0300 Subject: [PATCH] refs #1324: chained panning of OCC viewer created in other module --- src/HYDROGUI/HYDROGUI_Module.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/HYDROGUI/HYDROGUI_Module.cxx b/src/HYDROGUI/HYDROGUI_Module.cxx index c4e65d63..f20ed70c 100644 --- a/src/HYDROGUI/HYDROGUI_Module.cxx +++ b/src/HYDROGUI/HYDROGUI_Module.cxx @@ -214,13 +214,18 @@ bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy ) ViewManagerList anOCCViewManagers; anApp->viewManagers( OCCViewer_Viewer::Type(), anOCCViewManagers ); - foreach ( const SUIT_ViewManager* aViewManager, anOCCViewManagers ) + foreach ( SUIT_ViewManager* aViewManager, anOCCViewManagers ) { connect( aViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ), this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) ); connect( aViewManager, SIGNAL( activated( SUIT_ViewManager* ) ), this, SLOT( onViewActivated( SUIT_ViewManager* ) ) ); + OCCViewer_ViewManager* occ_mgr = dynamic_cast( aViewManager ); + if( occ_mgr ) + occ_mgr->setChainedOperations( true );//TODO: via preferences + + foreach( SUIT_ViewWindow* aViewWindow, aViewManager->getViews() ) { OCCViewer_ViewFrame* aViewFrame = dynamic_cast( aViewWindow ); -- 2.39.2