]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Show confirmation dialog box on "Re-open study" operation.
authorvsr <vsr@opencascade.com>
Fri, 21 Aug 2009 10:02:12 +0000 (10:02 +0000)
committervsr <vsr@opencascade.com>
Fri, 21 Aug 2009 10:02:12 +0000 (10:02 +0000)
src/STD/STD_Application.cxx
src/STD/resources/STD_msg_en.ts

index c78579f0fce055d849395e40e25a29218702a0c5..692a270bfad083586e6fd7b73fcbe9c2a0fcf0fb 100755 (executable)
@@ -338,6 +338,12 @@ bool STD_Application::onReopenDoc()
 
   SUIT_Study* study = activeStudy();
   if ( study && study->isSaved() ) {
+    // ask user for the confirmation
+    if ( SUIT_MessageBox::question( desktop(), tr( "REOPEN_STUDY" ), tr( "REOPEN_QUESTION" ),
+                                   SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No
+                                   ) == SUIT_MessageBox::No )
+      return false;
+
     // remember study name
     QString studyName = study->studyName();
 
index 30c0e5919e5a70119ff2fd6fe8e4c299389d2150..f1d397d530ee46e767daa46869ee3cf69117343d 100644 (file)
@@ -498,5 +498,14 @@ Do you want to save changes?</translation>
         <source>CLOSE_QUESTION</source>
         <translation>Do you want to save study before closing?</translation>
     </message>
+    <message>
+        <source>REOPEN_STUDY</source>
+        <translation>Reopen study</translation>
+    </message>
+    <message>
+        <source>REOPEN_QUESTION</source>
+        <translation>Do you really want to re-open study?
+All the changes made since last saving will be lost.</translation>
+    </message>
 </context>
 </TS>