From cebbcf3566cc7ebc79c11e81508f3f97bbab5b48 Mon Sep 17 00:00:00 2001 From: vtn Date: Fri, 19 Jun 2015 18:01:17 +0300 Subject: [PATCH] Do not show SUIT_FileDialog in batch mode. --- src/SUIT/SUIT_FileDlg.cxx | 9 +++++++++ src/SUIT/SUIT_FileDlg.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/SUIT/SUIT_FileDlg.cxx b/src/SUIT/SUIT_FileDlg.cxx index f2f8d4c1b..1a9c364d4 100755 --- a/src/SUIT/SUIT_FileDlg.cxx +++ b/src/SUIT/SUIT_FileDlg.cxx @@ -178,6 +178,15 @@ SUIT_FileDlg::~SUIT_FileDlg() setValidator( 0 ); } +/*! + \brief Returns Rejected in batch mode. +*/ +int SUIT_FileDlg::exec() +{ + if ( getenv( "SALOME_BATCH_MODE" ) ) + return QDialog::Rejected; + return QFileDialog::exec(); +} /*! \brief Check if the dialog box is used for opening or saving the file. diff --git a/src/SUIT/SUIT_FileDlg.h b/src/SUIT/SUIT_FileDlg.h index f8fa14ea3..0f6a45798 100755 --- a/src/SUIT/SUIT_FileDlg.h +++ b/src/SUIT/SUIT_FileDlg.h @@ -59,6 +59,8 @@ public: void selectFile( const QString& ); + int exec(); + static QString getLastVisitedDirectory(); static QString getFileName( QWidget*, -- 2.39.2