]> 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 06:57:23 +0000 (06:57 +0000)
committerdmv <dmv@opencascade.com>
Thu, 1 Oct 2009 06:57:23 +0000 (06:57 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/resources/SalomeApp_msg_en.ts

index bea36e500e2064d777bff1426d759250cb3d8a8e..01690dd80f29967c76b6cd0a38ed04345adc3c62 100644 (file)
@@ -670,8 +670,7 @@ bool DumpStudyFileValidator::canSave(const QString& file, bool permissions)
 {
   QFileInfo fi( file );
   QString name = fi.fileName(); 
-  
-  if ( name.indexOf( QRegExp("[-!?#*&]") ) >= 0 ) {
+  if ( name.indexOf( QRegExp("[-!?#*&]") ) >= 0 || name.indexOf( QRegExp("[0-9]")) == 0 ) {
     SUIT_MessageBox::critical( parent(),
                               QObject::tr("WRN_WARNING"),
                               QObject::tr("WRN_FILE_NAME_BAD") );
index 2252e9a2a5add2d5b0ddfb8b3e8c17ae38c6c523..51e3f870d042e3980a43844d5cfa98b2b4d019ef 100644 (file)
@@ -26,7 +26,7 @@
     <name>@default</name>
     <message>
         <source>WRN_FILE_NAME_BAD</source>
-        <translation>Please enter correct file name. Special characters are not allowed.</translation>
+        <translation>Please, enter a valid file name. The name should not contain any reserved characters or begin with a numeral.</translation>
     </message>
     <message>
         <source>CLOSE_LOCKED_STUDY</source>