From: rnv Date: Wed, 19 Nov 2008 17:19:20 +0000 (+0000) Subject: Now study declared as being modifyed after change variables. X-Git-Tag: TG_DumpPython_Extension_3~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1e21cc9d26b337a9aca1966975ccb0f28f15630e;p=modules%2Fgui.git Now study declared as being modifyed after change variables. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index d1f303129..b0b149203 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -722,6 +722,8 @@ void SalomeApp_Application::onNoteBook() _PTR(Study) aStudy = appStudy->studyDS(); SalomeApp_NoteBookDlg aDlg(desktop(),aStudy); aDlg.exec(); + updateCommandsStatus(); + updateDesktopTitle(); } } diff --git a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx index ccfe06cf3..7af153779 100644 --- a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx +++ b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx @@ -853,6 +853,9 @@ bool SalomeApp_NoteBookDlg::updateStudy() if( !study ) return false; + bool isStudySaved = study->isSaved(); + QString aStudyName = study->studyName(); + _PTR(Study) studyDS = study->studyDS(); // get unique temporary directory name @@ -905,6 +908,9 @@ bool SalomeApp_NoteBookDlg::updateStudy() { myStudy = newStudy->studyDS(); myTable->Init( myStudy ); + if(isStudySaved) { + newStudy->markAsSavedIn(aStudyName); + } } else ok = false; diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index 459bc4ac2..60aa7884a 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -589,6 +589,16 @@ 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) +{ + setStudyName(theFileName); + setIsSaved(true); +} + /*! Deletes all references to object \param obj - object diff --git a/src/SalomeApp/SalomeApp_Study.h b/src/SalomeApp/SalomeApp_Study.h index cd2df2762..8e6f60bc4 100644 --- a/src/SalomeApp/SalomeApp_Study.h +++ b/src/SalomeApp/SalomeApp_Study.h @@ -74,6 +74,7 @@ public: virtual std::string getVisualComponentName(); virtual void restoreState(int savePoint); + void markAsSavedIn(QString theFileName); protected: virtual void saveModuleData ( QString theModuleName, QStringList theListOfFiles ); @@ -86,6 +87,8 @@ protected: const std::vector theListOfFiles); virtual void RemoveTemporaryFiles ( const char* theModuleName, const bool isMultiFile) const; + + protected: virtual void dataModelInserted( const CAM_DataModel* ); virtual bool openDataModel( const QString&, CAM_DataModel* );