]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Additional fix for bug NPAL19028 (see remarks from Olivier Giorgis).
authormzn <mzn@opencascade.com>
Tue, 29 Apr 2008 13:15:57 +0000 (13:15 +0000)
committermzn <mzn@opencascade.com>
Tue, 29 Apr 2008 13:15:57 +0000 (13:15 +0000)
src/GEOMToolsGUI/GEOMToolsGUI.cxx

index abac1b184cd736cf987fbf36cd2dcb1866b478ba..29a7a32cd56edfe590d4f8ce80f865c8d069897c 100644 (file)
@@ -77,7 +77,8 @@ static QString getFileName( QWidget*           parent,
                             const QStringList  filters,
                            const QString&     caption,
                            bool               open,
-                           QString&           format )
+                           QString&           format,
+                           bool               showCurrentDirInitially = false)
 {
   static QString lastUsedFilter;
   //QStringList filters;
@@ -94,7 +95,9 @@ static QString getFileName( QWidget*           parent,
   if ( !caption.isEmpty() )
     fd->setCaption( caption );
 
-  if ( !initial.isEmpty() )
+  if ( showCurrentDirInitially && SUIT_FileDlg::getLastVisitedPath().isEmpty() )
+    fd->setSelection( QDir::currentDirPath() );
+  else if ( !initial.isEmpty() )
     fd->setSelection( initial );
 
   fd->setFilters( filters );
@@ -537,9 +540,9 @@ bool GEOMToolsGUI::Import()
   }
 
   QString fileType;
-
-  QString fileName = getFileName(app->desktop(), QDir::currentDirPath(), aMap, filters,
-                                 tr("GEOM_MEN_IMPORT"), true, fileType);
+  
+  QString fileName = getFileName(app->desktop(), "", aMap, filters,
+                                 tr("GEOM_MEN_IMPORT"), true, fileType, true);
 
   if (fileType.isEmpty() )
     {