]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
always restore its URL after having backed up a study
authormbs <martin.bernhard@opencascade.com>
Fri, 19 Jan 2024 19:10:05 +0000 (19:10 +0000)
committermbs <martin.bernhard@opencascade.com>
Fri, 19 Jan 2024 23:08:16 +0000 (23:08 +0000)
src/SalomeApp/SalomeApp_Study.cxx

index ecd50357e20ba2bcb68552bb36191fc40beaef0f..4b3da9174d4ba3cdbeb9d37a001abf70d5a11a50 100644 (file)
@@ -658,12 +658,16 @@ bool SalomeApp_Study::saveDocumentAs( const QString& theFileName, bool isBackup/
   if ( res && !isBackup)
     emit saved( this );
 
-  if (isBackup) {
+  if (isBackup)
+  {
     // Restore the isSaved and isModified flag after having done backup
     setIsSaved(wasSaved);
     setIsModified(wasModified);
     // If the document hasn't been saved before, reset here its name and URL
-    if (!wasSaved && studyDS()) {
+    if (studyDS())
+    {
+      MSGEL("Restore URL  to: " << oldURL);
+      MSGEL("Restore Name to: " << oldName);
       studyDS()->URL(oldURL);
       studyDS()->Name(oldName);
     }