From ad486de00d0e0f89658681891497ec38f56d6c93 Mon Sep 17 00:00:00 2001 From: dmv Date: Fri, 8 Feb 2008 11:18:02 +0000 Subject: [PATCH] IPAL 18008 --- src/SalomeApp/SalomeApp_Application.cxx | 23 +++++++++++++++++++-- src/SalomeApp/resources/SalomeApp_msg_en.po | 3 +++ 2 files changed, 24 insertions(+), 2 deletions(-) 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" -- 2.39.2