From: kga Date: Thu, 31 Jan 2013 06:44:22 +0000 (+0000) Subject: IPAL51672: Changes in notebook are not saved to study X-Git-Tag: V6_main_FINAL~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a51b3424fc64354e2c192f895d520526db413fee;p=modules%2Fgui.git IPAL51672: Changes in notebook are not saved to study --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 996c9bf33..937e88e51 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -1982,10 +1982,10 @@ bool SalomeApp_Application::onRestoreStudy( const QString& theDumpScript, { _PTR(Study) aStudyDS = newStudy->studyDS(); app->getNoteBook()->Init( aStudyDS ); - if( theIsStudySaved ) { - newStudy->markAsSavedIn( theStudyName ); - newStudy->Modified(); - } + newStudy->updateFromNotebook(theStudyName, theIsStudySaved); + newStudy->Modified(); + updateDesktopTitle(); + updateActions(); } else ok = false; diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 778877564..7e3659945 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -1134,10 +1134,11 @@ void SalomeApp_Study::RemoveTemporaryFiles ( const char* theModuleName, const bo Mark the study as saved in the file \param theFileName - the name of file */ -void SalomeApp_Study::markAsSavedIn(QString theFileName) +void SalomeApp_Study::updateFromNotebook( const QString& theFileName, bool isSaved ) { setStudyName(theFileName); - setIsSaved(true); + studyDS()->Name(theFileName.toStdString()); + setIsSaved( isSaved ); } LightApp_DataObject* SalomeApp_Study::findObjectByEntry( const QString& theEntry ) diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index 35508b0bd..7d53b75b8 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -83,7 +83,7 @@ public: void setNameOfSavePoint(int savePoint, const QString& nameOfSavePoint); virtual void restoreState(int savePoint); - void markAsSavedIn(QString theFileName); + void updateFromNotebook(const QString&, bool); virtual LightApp_DataObject* findObjectByEntry( const QString& theEntry );