From: Sergey POKHODENKO Date: Tue, 19 May 2015 07:07:51 +0000 (+0300) Subject: ModuleBase_WidgetFileSelector uses curent value as default for the dialog X-Git-Tag: V_1.2.0~145^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66795fa02a6133abab5f79eefeba8a994e7d23f3;p=modules%2Fshaper.git ModuleBase_WidgetFileSelector uses curent value as default for the dialog --- diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp index c7fcacd11..139b3849a 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp @@ -111,10 +111,11 @@ bool ModuleBase_WidgetFileSelector::isCurrentPathValid() void ModuleBase_WidgetFileSelector::onPathSelectionBtn() { + QString aDefaultPath = myPathField->text().isEmpty() ? myDefaultPath : myPathField->text(); QString aFilter = filterString(); QString aFileName = (myType == WFS_SAVE) - ? QFileDialog::getSaveFileName(this, myTitle, myDefaultPath, aFilter) - : QFileDialog::getOpenFileName(this, myTitle, myDefaultPath, aFilter); + ? QFileDialog::getSaveFileName(this, myTitle, aDefaultPath, aFilter) + : QFileDialog::getOpenFileName(this, myTitle, aDefaultPath, aFilter); if (!aFileName.isEmpty()) { myPathField->setText(aFileName); }