From ba65e6fc3651e5e07c86936a963de251db0a8b6e Mon Sep 17 00:00:00 2001 From: san Date: Wed, 1 Jun 2005 14:31:53 +0000 Subject: [PATCH] setStudyName() called from createDocument() to avoid creating unnamed documents --- src/SalomeApp/SalomeApp_Study.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.39.2