From: vsr Date: Fri, 21 Aug 2009 10:02:12 +0000 (+0000) Subject: Show confirmation dialog box on "Re-open study" operation. X-Git-Tag: V5_1_3rc1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f498e4353681c912cd8817fab50b4d909e6e078;p=modules%2Fgui.git Show confirmation dialog box on "Re-open study" operation. --- diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index c78579f0f..692a270bf 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -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(); diff --git a/src/STD/resources/STD_msg_en.ts b/src/STD/resources/STD_msg_en.ts index 30c0e5919..f1d397d53 100644 --- a/src/STD/resources/STD_msg_en.ts +++ b/src/STD/resources/STD_msg_en.ts @@ -498,5 +498,14 @@ Do you want to save changes? CLOSE_QUESTION Do you want to save study before closing? + + REOPEN_STUDY + Reopen study + + + REOPEN_QUESTION + Do you really want to re-open study? +All the changes made since last saving will be lost. +