From cb719bf47163cd107d21ca553ece0a1acc5a96c9 Mon Sep 17 00:00:00 2001 From: dmv Date: Thu, 1 Oct 2009 07:00:36 +0000 Subject: [PATCH] 0020502: EDF 1097 ALL: Load script with a name starting with a number --- src/SalomeApp/SalomeApp_Application.cxx | 2 +- src/SalomeApp/resources/SalomeApp_msg_en.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 54a4ce85c..4cbc35756 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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"), diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index cb61307d7..70495b402 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -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" -- 2.39.2