From: san Date: Wed, 1 Jun 2005 14:31:53 +0000 (+0000) Subject: setStudyName() called from createDocument() to avoid creating unnamed documents X-Git-Tag: T3_0_0_a1~35 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba65e6fc3651e5e07c86936a963de251db0a8b6e;p=modules%2Fgui.git setStudyName() called from createDocument() to avoid creating unnamed documents --- diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index f735c6658..0ba477280 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -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;