From: dmv Date: Fri, 8 Feb 2008 11:18:02 +0000 (+0000) Subject: IPAL 18008 X-Git-Tag: V4_1_1rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad486de00d0e0f89658681891497ec38f56d6c93;p=modules%2Fgui.git IPAL 18008 --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 771c0d7de..802d7d7b0 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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; diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index 40f7e95f1..d6a6d6d90 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -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"