]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
BugID IPAL9100, fixed method saveAsStudy. Now it's forbid to save a study under a...
authorsrn <srn@opencascade.com>
Mon, 11 Jul 2005 07:23:10 +0000 (07:23 +0000)
committersrn <srn@opencascade.com>
Mon, 11 Jul 2005 07:23:10 +0000 (07:23 +0000)
there is opened study, which has already been saved under that filename

src/SALOMEGUI/QAD_Application.cxx

index ef2a9c39d92b2270f1f0a5d573f1efba43fd238c..0c1296db910240381158b59275661973c62db971 100644 (file)
@@ -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 <fileName> then forbid the saving
+       }
+       //SRN:: BugID IPAL9100: End
+    
        /* check permission */
         if (!checkPermission(name))
           return false;