Salome HOME
Added new About dialog box
[modules/gui.git] / src / SalomeApp / SalomeApp_Study.cxx
index 7b3be65494e161eef4b9529f70aa57df69ec4f94..0ba477280f0f016308cc045ff753a1b85cb8ddbe 100644 (file)
@@ -39,11 +39,13 @@ void SalomeApp_Study::createDocument()
   MESSAGE( "openDocument" );
 
   // initialize myStudyDS, read HDF file
-  _PTR(Study) study ( SalomeApp_Application::studyMgr()->NewStudy( newStudyName().latin1() ) );
+  QString aName = newStudyName();
+  _PTR(Study) study ( SalomeApp_Application::studyMgr()->NewStudy( aName.latin1() ) );
   if ( !study )
     return;
 
   setStudyDS( study );
+  setStudyName( aName );
 
   // create myRoot
   setRoot( new SalomeApp_RootObject( this ) );
@@ -187,10 +189,10 @@ void SalomeApp_Study::closeDocument()
   emit closed( this );
 
   // close SALOMEDS document
-  _PTR(Study) st = studyDS();
-  if ( st.get() )
+  _PTR(Study) studyPtr = studyDS();
+  if ( studyPtr )
   {
-    SalomeApp_Application::studyMgr()->Close( st );
+    SalomeApp_Application::studyMgr()->Close( studyPtr );
     SALOMEDSClient_Study* aStudy = 0;
     setStudyDS( _PTR(Study)(aStudy) );
   }
@@ -258,7 +260,7 @@ void SalomeApp_Study::dataModelInserted (const CAM_DataModel* dm)
         aComp = aBuilder->NewComponent(dm->module()->name());
 
         // Set default engine IOR
-        aBuilder->DefineComponentInstance(aComp, SalomeApp_Application::defaultEngineIOR());
+        aBuilder->DefineComponentInstance(aComp, SalomeApp_Application::defaultEngineIOR().latin1());
       }
     }
   }