aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/preferences.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 5969a2d47..f3a88fcd3 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -307,7 +307,10 @@ void PreferencesDialog::buttonClicked(QAbstractButton* button)
void PreferencesDialog::on_chooseFile_clicked()
{
QFileInfo fi(system_default_filename());
- ui.defaultfilename->setText(QFileDialog::getOpenFileName(this, tr("Open Default Log File"), fi.absolutePath(), tr("Subsurface XML files (*.ssrf *.xml *.XML)")));
+ QString choosenFileName = QFileDialog::getOpenFileName(this, tr("Open Default Log File"), fi.absolutePath(), tr("Subsurface XML files (*.ssrf *.xml *.XML)"));
+
+ if(!choosenFileName.isEmpty())
+ ui.defaultfilename->setText(choosenFileName);
}
void PreferencesDialog::emitSettingsChanged()