diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-11-22 07:47:25 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-11-22 07:47:25 -0800 |
commit | ba1631f52d931b5fdc66d0ae6033203d133b74c2 (patch) | |
tree | 8930bef2c94e491b26d497c5a5089d5f8e77e411 /qt-ui/mainwindow.cpp | |
parent | cc857e6fe4365ca24ad434544c8451dc6bc8acef (diff) | |
download | subsurface-ba1631f52d931b5fdc66d0ae6033203d133b74c2.tar.gz |
Don't ask confusing questions in open file dialog
Using the SaveFile dialog to open a file caused it to ask the user if they
wanted to overwrite a file when they actually tried to open an existing
file. This fixes that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 0b97d8c94..c455a43fe 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -211,7 +211,7 @@ void MainWindow::on_actionOpen_triggered() // yes, this look wrong to use getSaveFileName() for the open dialog, but we need to be able // to enter file names that don't exist in order to use our git syntax /path/to/dir[branch] // with is a potentially valid input, but of course won't exist. So getOpenFileName() wouldn't work - QString filename = QFileDialog::getSaveFileName(this, tr("Open file"), lastUsedDir(), filter()); + QString filename = QFileDialog::getSaveFileName(this, tr("Open file"), lastUsedDir(), filter(), NULL, QFileDialog::DontConfirmOverwrite); if (filename.isEmpty()) return; updateLastUsedDir(QFileInfo(filename).dir().path()); |