]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL19306 fixed
authorvsr <vsr@opencascade.com>
Tue, 18 Mar 2008 16:04:20 +0000 (16:04 +0000)
committervsr <vsr@opencascade.com>
Tue, 18 Mar 2008 16:04:20 +0000 (16:04 +0000)
src/SUIT/SUIT_FileDlg.cxx

index cd23a38d741c04386bee03de8401c3908301bedb..3ab4dc31832d965a0b4fc289e718500894e92a5c 100755 (executable)
@@ -278,9 +278,15 @@ bool SUIT_FileDlg::addWidgets( QWidget* l, QWidget* w, QWidget* b )
 QStringList SUIT_FileDlg::selectedFiles() const
 {
   QStringList files = QFileDialog::selectedFiles();
-  QMutableListIterator<QString> it( files );
-  while ( it.hasNext() )
-    it.setValue( addExtension( it.next() ) );
+  if ( fileMode() != DirectoryOnly && fileMode() != Directory ) {
+    QMutableListIterator<QString> it( files );
+    while ( it.hasNext() ) {
+      QString f = it.next();
+      QFileInfo finfo( f );
+      if ( !finfo.isDir() )
+       it.setValue( addExtension( f ) );
+    }
+  }
   return files;
 }