From: jfa Date: Mon, 31 Oct 2005 14:29:03 +0000 (+0000) Subject: Fix for bug 10095: No warning if to open unloaded study from file X-Git-Tag: V3_1_0a3~90 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aaae65345bb8b3760ff451e976be75ce30fa4521;p=modules%2Fgui.git Fix for bug 10095: No warning if to open unloaded study from file --- diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 8bf643109..2b5759931 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -329,10 +329,11 @@ void STD_Application::afterCloseDoc() } /*!Close document, if it's possible.*/ -void STD_Application::onCloseDoc() +void STD_Application::onCloseDoc(bool ask) { - if ( !isPossibleToClose() ) - return; + if (ask) + if ( !isPossibleToClose() ) + return; SUIT_Study* study = activeStudy(); diff --git a/src/STD/STD_Application.h b/src/STD/STD_Application.h index 378d030d0..aa15b2477 100755 --- a/src/STD/STD_Application.h +++ b/src/STD/STD_Application.h @@ -74,7 +74,7 @@ signals: public slots: virtual void onNewDoc(); - virtual void onCloseDoc(); + virtual void onCloseDoc( bool ask = true ); virtual void onSaveDoc(); virtual bool onSaveAsDoc(); diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.po b/src/SalomeApp/resources/SalomeApp_msg_en.po index 6dc631fcd..a0effdbe0 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.po +++ b/src/SalomeApp/resources/SalomeApp_msg_en.po @@ -322,6 +322,9 @@ msgstr "PYTHON Files (*.py)" msgid "SalomeApp_Application::STUDY_LOCKED" msgstr "LOCKED" +msgid "SalomeApp_Application::QUE_DOC_ALREADYEXIST" +msgstr "The document %1 already exists in study manager.\nDo you want to reload it ?" + //======================================================================================= msgid "SalomeApp_ModuleDlg::CAPTION"