]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
setStudyName() called from createDocument() to avoid creating unnamed documents
authorsan <san@opencascade.com>
Wed, 1 Jun 2005 14:31:53 +0000 (14:31 +0000)
committersan <san@opencascade.com>
Wed, 1 Jun 2005 14:31:53 +0000 (14:31 +0000)
src/SalomeApp/SalomeApp_Study.cxx

index f735c66588d85de553102d942749273fd8f15635..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 ) );
@@ -188,7 +190,7 @@ void SalomeApp_Study::closeDocument()
 
   // close SALOMEDS document
   _PTR(Study) studyPtr = studyDS();
-  if ( studyPtr.get() )
+  if ( studyPtr )
   {
     SalomeApp_Application::studyMgr()->Close( studyPtr );
     SALOMEDSClient_Study* aStudy = 0;