From 068661939a4f9d3b029ca1509a42f4eeb5d1dcb8 Mon Sep 17 00:00:00 2001 From: mbs Date: Fri, 19 Jan 2024 19:10:05 +0000 Subject: [PATCH] always restore its URL after having backed up a study --- src/SalomeApp/SalomeApp_Study.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index ecd50357e..4b3da9174 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -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); } -- 2.39.2