From: vtn Date: Tue, 13 May 2014 08:34:29 +0000 (+0400) Subject: #2090: External 20694 Drive Guithare by a script, without opening it X-Git-Tag: CTH_1_10_a~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=55819d3876acaca7d8f53a3454bc5265d6b1a55d;p=modules%2Fgui.git #2090: External 20694 Drive Guithare by a script, without opening it --- 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;