From 55819d3876acaca7d8f53a3454bc5265d6b1a55d Mon Sep 17 00:00:00 2001 From: vtn Date: Tue, 13 May 2014 12:34:29 +0400 Subject: [PATCH] #2090: External 20694 Drive Guithare by a script, without opening it --- src/SUIT/SUIT_Session.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SUIT/SUIT_Session.cxx b/src/SUIT/SUIT_Session.cxx index 9cb7c1a02..fecc67c43 100755 --- a/src/SUIT/SUIT_Session.cxx +++ b/src/SUIT/SUIT_Session.cxx @@ -714,8 +714,10 @@ void SUIT_Session::restoreBackup() { QWidget* p = activeApplication() ? (QWidget*)activeApplication()->desktop() : 0; - int aBtn = SUIT_MessageBox::warning( p, tr( "WRN_WARNING" ), tr( "WANT_TO_RESTORE" ), - SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes ); + int aBtn = SUIT_MessageBox::No; + if ( !getenv( "SALOME_BATCH_MODE" ) ) + aBtn = SUIT_MessageBox::warning( p, tr( "WRN_WARNING" ), tr( "WANT_TO_RESTORE" ), + SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::Yes ); if ( aBtn == SUIT_MessageBox::Yes ) { QStringList::iterator it; -- 2.39.2