From aaae65345bb8b3760ff451e976be75ce30fa4521 Mon Sep 17 00:00:00 2001 From: jfa Date: Mon, 31 Oct 2005 14:29:03 +0000 Subject: [PATCH] Fix for bug 10095: No warning if to open unloaded study from file --- src/STD/STD_Application.cxx | 7 ++++--- src/STD/STD_Application.h | 2 +- src/SalomeApp/resources/SalomeApp_msg_en.po | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) 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" -- 2.39.2