From: srn Date: Mon, 11 Jul 2005 07:23:10 +0000 (+0000) Subject: BugID IPAL9100, fixed method saveAsStudy. Now it's forbid to save a study under a... X-Git-Tag: T2_2_5a~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=98c9dbb8620ef24319adbfeb9d44ab5a9697fb68;p=modules%2Fkernel.git 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 --- 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;