Salome HOME
multistudy removal part 1
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Module.cxx
index aeacb30b53d9fb739a760cf440eab91fd948e7b1..40cc9237ae54da5369a22654357fbebca147e34d 100755 (executable)
@@ -250,7 +250,7 @@ bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy )
   SalomeApp_Study* aStudy = 
     dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() );
   if ( aStudy ) {
-    SALOMEDS::Study_var aDSStudy = GeometryGUI::ClientStudyToStudy( aStudy->studyDS() );
+    SALOMEDS::Study_var aDSStudy = GeometryGUI::getStudyServant();
     GEOM::GEOM_Gen_var aGeomEngine = GeometryGUI::GetGeomGen();
     if ( !aGeomEngine->_is_nil() && !aGeomEngine->_is_nil() ) {
       SALOMEDS::StudyBuilder_var aStudyBuilder = aDSStudy->NewBuilder();
@@ -969,7 +969,7 @@ void HYDROGUI_Module::preferencesChanged( const QString& theSection, const QStri
     if ( theSection == "preferences" && thePref == "default_strickler_coefficient" )
     {
         
-        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() );
+        Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
         if ( resMgr && !aDoc.IsNull() )
             aDoc->SetDefaultStricklerCoefficient( resMgr->doubleValue( theSection, thePref, 0 ) );
     }
@@ -1932,8 +1932,7 @@ void HYDROGUI_Module::onMouseMove( SUIT_ViewWindow* theViewWindow, QMouseEvent*
     if ( aDesktop && aDesktop->statusBar() )
     {
       gp_Pnt aWPnt( X, Y, Z );
-      int aStudyId = application()->activeStudy()->id();
-      HYDROData_Document::Document( aStudyId )->Transform( aWPnt, false );
+      HYDROData_Document::Document()->Transform( aWPnt, false );
       double WX = aWPnt.X(), WY = aWPnt.Y();
 
       QString aXStr = HYDROGUI_Tool::GetCoordinateString( X, true );