mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
cc857e6fe4
commit
ba1631f52d
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue