]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL51672: Changes in notebook are not saved to study
authorkga <kga@opencascade.com>
Thu, 31 Jan 2013 06:44:22 +0000 (06:44 +0000)
committerkga <kga@opencascade.com>
Thu, 31 Jan 2013 06:44:22 +0000 (06:44 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Study.cxx
src/SalomeApp/SalomeApp_Study.h

index 996c9bf333337c43bf364714481137c2bcf123e5..937e88e51f897fa877e40eb258017f03d2b57d10 100644 (file)
@@ -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;
index 7788775647394c9a85e32bf902162ea29651c101..7e3659945ceba819cb032c2db2cc5d0ac2335cc6 100644 (file)
@@ -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 )
index 35508b0bd4b82185c53a2d5e13c0ed5b5991c0f3..7d53b75b8429cc7647da44864c9765003bbca39b 100644 (file)
@@ -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 );