From 4f498e4353681c912cd8817fab50b4d909e6e078 Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 21 Aug 2009 10:02:12 +0000 Subject: [PATCH] Show confirmation dialog box on "Re-open study" operation. --- src/STD/STD_Application.cxx | 6 ++++++ src/STD/resources/STD_msg_en.ts | 9 +++++++++ 2 files changed, 15 insertions(+) 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. + -- 2.39.2