From 38eb185f80a6139ef10207066358b3de3ae1263b Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 29 Apr 2008 13:15:57 +0000 Subject: [PATCH] Additional fix for bug NPAL19028 (see remarks from Olivier Giorgis). --- src/GEOMToolsGUI/GEOMToolsGUI.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index abac1b184..29a7a32cd 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -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() ) { -- 2.39.2