]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0020502: EDF 1097 ALL: Load script with a name starting with a number
authordmv <dmv@opencascade.com>
Thu, 1 Oct 2009 07:00:36 +0000 (07:00 +0000)
committerdmv <dmv@opencascade.com>
Thu, 1 Oct 2009 07:00:36 +0000 (07:00 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/resources/SalomeApp_msg_en.po

index 54a4ce85c96ff2d11d077f5e2b31a93bbed43887..4cbc35756b618a5acc8d1fc553bf2f0df33e1250 100644 (file)
@@ -705,7 +705,7 @@ bool DumpStudyFileValidator::canSave(const QString& file)
   QFileInfo fi( file );
   QString name = fi.fileName(); 
   
-  if ( name.find( QRegExp("[-!?#*&]") ) != -1 ) {
+  if ( name.find( QRegExp("[-!?#*&]") ) != -1 || name.find( QRegExp("[0-9]")) == 0 ) {
     SUIT_MessageBox::error1 ( parent(),
                              QObject::tr("WRN_WARNING"),
                              QObject::tr("WRN_FILE_NAME_BAD"),
index cb61307d7227c428371c240428786dcb4942ee7e..70495b402bf7d14cf30ad66b5635f394ca33ddc2 100644 (file)
@@ -225,7 +225,7 @@ msgid "SalomeApp_Application::WRN_DUMP_STUDY_FAILED"
 msgstr "Dump study failed"
 
 msgid "WRN_FILE_NAME_BAD"
-msgstr "Please enter correct file name. Special chars are not allowed."
+msgstr "Please, enter a valid file name. The name should not contain any reserved characters or begin with a numeral."
 
 msgid "SAVE_POINT_OBJECT_TOOLTIP"
 msgstr "Saved GUI state: %1"