Additional fix for bug NPAL19028 (see remarks from Olivier Giorgis).

This commit is contained in:
mzn 2008-04-29 13:15:57 +00:00
parent 1558ae05ba
commit 38eb185f80

View File

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