]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1324: chained panning of OCC viewer created in other module
authorasl <asl@opencascade.com>
Mon, 13 Nov 2017 08:08:27 +0000 (11:08 +0300)
committerasl <asl@opencascade.com>
Mon, 13 Nov 2017 08:08:27 +0000 (11:08 +0300)
src/HYDROGUI/HYDROGUI_Module.cxx

index c4e65d633282aebc243d43ca3d2a7a42fb646ba8..f20ed70caa623502d0fc1e5f8fb384464fed807b 100644 (file)
@@ -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<OCCViewer_ViewManager*>( aViewManager );
+    if( occ_mgr )
+      occ_mgr->setChainedOperations( true );//TODO: via preferences
+
+
     foreach( SUIT_ViewWindow* aViewWindow, aViewManager->getViews() )
     {
       OCCViewer_ViewFrame* aViewFrame = dynamic_cast<OCCViewer_ViewFrame*>( aViewWindow );