diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index ce5a4fd9c..1c013ea08 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -470,7 +470,11 @@ bool DatabaseOpenWidget::browseKeyFile() if (filename.isEmpty()) { return false; } - FileDialog::saveLastDir("keyfile", filename, true); + if (config()->get(Config::RememberLastKeyFiles).toBool()) { + FileDialog::saveLastDir("keyfile", filename, true); + } else { + FileDialog::saveLastDir("keyfile", {}); + } if (QFileInfo(filename).canonicalFilePath() == QFileInfo(m_filename).canonicalFilePath()) { MessageBox::warning(this,