]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Now study declared as being modifyed after change variables.
authorrnv <rnv@opencascade.com>
Wed, 19 Nov 2008 17:19:20 +0000 (17:19 +0000)
committerrnv <rnv@opencascade.com>
Wed, 19 Nov 2008 17:19:20 +0000 (17:19 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_NoteBookDlg.cxx
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index d1f30312977fff48fe201bbc3dd1920cd2841b7b..b0b149203f5c830958c1f7bc2e9e833d01e341f1 100644 (file)
@@ -722,6 +722,8 @@ void SalomeApp_Application::onNoteBook()
     _PTR(Study) aStudy = appStudy->studyDS();
     SalomeApp_NoteBookDlg aDlg(desktop(),aStudy);
     aDlg.exec();
+    updateCommandsStatus();
+    updateDesktopTitle();
   }
 }
 
index ccfe06cf3954318073735c97ca4c3d72507c6eb2..7af1537792828662ab29307fbe21fdefb37ca52b 100644 (file)
@@ -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;
index 459bc4ac22a1f2ef62839668d862f670a4ff409a..60aa7884aac4a449354ff616540feb8034f7f63a 100644 (file)
@@ -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
index cd2df276214423c3297562ce0201a40a44ac2c43..8e6f60bc49e02111537483a876fe6f0088d3fe6a 100644 (file)
@@ -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<std::string> 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* );