From: vsr Date: Wed, 2 Jul 2008 08:35:38 +0000 (+0000) Subject: IMP 001989: multi selection in "Import" dialog boxes X-Git-Tag: V4_1_4a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a6df2f5a403ed1d3e8794e26771ef38a86bd1656;p=modules%2Fgui.git IMP 001989: multi selection in "Import" dialog boxes --- diff --git a/src/SUIT/SUIT_FileDlg.cxx b/src/SUIT/SUIT_FileDlg.cxx index ec7bc547f..784478eac 100755 --- a/src/SUIT/SUIT_FileDlg.cxx +++ b/src/SUIT/SUIT_FileDlg.cxx @@ -481,19 +481,19 @@ QStringList SUIT_FileDlg::getOpenFileNames( QWidget* parent, bool showQuickDir, SUIT_FileValidator* validator ) { - SUIT_FileDlg* fd = new SUIT_FileDlg( parent, true, showQuickDir, true ); - fd->setMode( ExistingFiles ); + SUIT_FileDlg fd( parent, true, showQuickDir, true ); + fd.setMode( ExistingFiles ); if ( !caption.isEmpty() ) - fd->setCaption( caption ); + fd.setCaption( caption ); if ( !initial.isEmpty() ) { - fd->processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug + fd.processPath( initial ); // VSR 24/03/03 check for existing of directory has been added to avoid QFileDialog's bug } - fd->setFilters( filters ); + fd.setFilters( filters ); if ( validator ) - fd->setValidator( validator ); - fd->exec(); - QStringList filenames = fd->selectedFiles(); - delete fd; + fd.setValidator( validator ); + QStringList filenames; + if ( fd.exec() ) + filenames = fd.selectedFiles(); qApp->processEvents(); return filenames; }