]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL 18008
authordmv <dmv@opencascade.com>
Fri, 8 Feb 2008 11:18:02 +0000 (11:18 +0000)
committerdmv <dmv@opencascade.com>
Fri, 8 Feb 2008 11:18:02 +0000 (11:18 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/resources/SalomeApp_msg_en.po

index 771c0d7deeb2f9174d984676938faa873d1915c9..802d7d7b0fd5ea10fc7d4ff3161750f9ff73592f 100644 (file)
@@ -702,8 +702,27 @@ void SalomeApp_Application::onDumpStudy( )
   fd->setFilters( aFilters );
   fd->myPublishChk->setChecked( true );
   fd->mySaveGUIChk->setChecked( true );
-  fd->exec();
-  QString aFileName = fd->selectedFile();
+  QString aFileName;
+  while (1) {
+    fd->exec();
+    fd->raise();
+    aFileName = fd->selectedFile();
+    if (!aFileName.isEmpty()) {
+      if ( (aFileName.find('-', 0) == -1) && (aFileName.find('!', 0) == -1) && (aFileName.find('?', 0) == -1) &&
+          (aFileName.find('#', 0) == -1) && (aFileName.find('*', 0) == -1) && (aFileName.find('&', 0) == -1)) {
+       break;
+      }
+      else {
+      SUIT_MessageBox::warn1 ( desktop(),
+                              QObject::tr("WRN_WARNING"),
+                              tr("WRN_FILE_NAME_BAD"),
+                              QObject::tr("BUT_OK") );
+      }
+    }
+    else {
+      break;
+    }
+  }
   bool toPublish = fd->myPublishChk->isChecked();
   bool toSaveGUI = fd->mySaveGUIChk->isChecked();
   delete fd;
index 40f7e95f1f6b3e390783320e4e0298d21c443d1f..d6a6d6d90d3d8d6fa40d414aa2b4d6a329cdd75c 100644 (file)
@@ -221,6 +221,9 @@ msgstr "Publish in study"
 msgid "SalomeApp_Application::WRN_DUMP_STUDY_FAILED"
 msgstr "Dump study failed"
 
+msgid "SalomeApp_Application::WRN_FILE_NAME_BAD"
+msgstr "Please enter correct file name"
+
 msgid "SAVE_POINT_OBJECT_TOOLTIP"
 msgstr "Saved GUI state: %1"