]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for bug 10095: No warning if to open unloaded study from file
authorjfa <jfa@opencascade.com>
Mon, 31 Oct 2005 14:29:03 +0000 (14:29 +0000)
committerjfa <jfa@opencascade.com>
Mon, 31 Oct 2005 14:29:03 +0000 (14:29 +0000)
src/STD/STD_Application.cxx
src/STD/STD_Application.h
src/SalomeApp/resources/SalomeApp_msg_en.po

index 8bf643109917ccaf9913ff0b69495875dec91921..2b5759931ddb0da045e8b6d424fc0c431f2d270a 100755 (executable)
@@ -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();
 
index 378d030d04d342316708bd74176d120ae992380f..aa15b247739922a4f6f6177c24581abd17342b60 100755 (executable)
@@ -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();
 
index 6dc631fcd7134fe716e4f7998ae3c1cef99959b3..a0effdbe0c9b9b2ba2b42109e78d6004445aaf6e 100644 (file)
@@ -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"