Salome HOME
lot 10 - warnings for DTM - untested
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ViewerDlg.cxx
index 78c17941309518f8ecc560fa886f0b6afdecc111..a2b58bc1f4bdbb6428f2bd5d02902fc837ea8e61 100644 (file)
@@ -43,7 +43,7 @@
 #include <QLineEdit>
 #include <QMouseEvent>
 
-HYDROGUI_ViewerDlg::HYDROGUI_ViewerDlg( HYDROGUI_Module* theModule, const QString& theTitle, bool isSplitter )
+HYDROGUI_ViewerDlg::HYDROGUI_ViewerDlg( HYDROGUI_Module* theModule, const QString& theTitle, bool isSplitter, bool dispTrihedron )
 : HYDROGUI_InputPanel( theModule, theTitle, true, isSplitter )
 {
   SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
@@ -53,7 +53,9 @@ HYDROGUI_ViewerDlg::HYDROGUI_ViewerDlg( HYDROGUI_Module* theModule, const QStrin
   SUIT_Study* aStudy = 0;
 #endif
   myViewManager = new OCCViewer_ViewManager( aStudy, 0 );
-  OCCViewer_Viewer* aViewer = new OCCViewer_Viewer( true );
+  bool IsChainedPan = aResMgr->booleanValue( "HYDRO", "chained_panning" );
+  myViewManager->setChainedOperations(IsChainedPan);
+  OCCViewer_Viewer* aViewer = new OCCViewer_Viewer( dispTrihedron );
 
   aViewer->setBackground( OCCViewer_ViewFrame::TOP_LEFT,
                           aResMgr->backgroundValue( "OCCViewer", "xz_background", aViewer->background(OCCViewer_ViewFrame::TOP_LEFT) ) );
@@ -121,7 +123,7 @@ bool HYDROGUI_ViewerDlg::event( QEvent* e )
         if ( !anAISContext.IsNull() && !aTrihedron.IsNull() )
         {
             viewer()->setTrihedronShown( false );
-            anAISContext->Display( aTrihedron );
+            anAISContext->Display( aTrihedron, true );
             anAISContext->Deactivate( aTrihedron );
         }
     }