From: asl Date: Mon, 13 Nov 2017 08:08:27 +0000 (+0300) Subject: refs #1324: chained panning of OCC viewer created in other module X-Git-Tag: v2.1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4afb8eaa70013dca004e781836cba959b1efa097;p=modules%2Fhydro.git refs #1324: chained panning of OCC viewer created in other module --- 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 );