From 98c9dbb8620ef24319adbfeb9d44ab5a9697fb68 Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 11 Jul 2005 07:23:10 +0000 Subject: [PATCH] BugID IPAL9100, fixed method saveAsStudy. Now it's forbid to save a study under a filename if there is opened study, which has already been saved under that filename --- src/SALOMEGUI/QAD_Application.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/SALOMEGUI/QAD_Application.cxx b/src/SALOMEGUI/QAD_Application.cxx index ef2a9c39d..0c1296db9 100644 --- a/src/SALOMEGUI/QAD_Application.cxx +++ b/src/SALOMEGUI/QAD_Application.cxx @@ -994,6 +994,13 @@ bool QAD_Application::saveAsStudy( QAD_Study* study, const QString& fileName ) #endif if ( !name.isNull() ) { + //SRN:: BugID IPAL9100: Begin + for ( QAD_Study* aStudy = myStudies.first(); aStudy; aStudy = myStudies.next() ) { + if ( aStudy->getStudyDocument()->URL() == name ) //If there is a study, which has been saved in a file + return false; //with the same name as then forbid the saving + } + //SRN:: BugID IPAL9100: End + /* check permission */ if (!checkPermission(name)) return false; -- 2.39.2