Commit 0cb5e749 authored by David Redondo's avatar David Redondo 🏎
Browse files

Pass only the path to the file dialog

lastSave(As)Location includes the filename. Remove it before passing the URL to
the QFileDialog.
BUG: 416629
parent 271644ad
......@@ -480,7 +480,7 @@ bool ExportManager::doSaveAs(QWidget *parentWindow, bool notify)
QFileDialog dialog(parentWindow);
dialog.setAcceptMode(QFileDialog::AcceptSave);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDirectoryUrl(Settings::self()->lastSaveAsLocation());
dialog.setDirectoryUrl(Settings::self()->lastSaveAsLocation().adjusted(QUrl::RemoveFilename));
dialog.selectFile(makeAutosaveFilename() + QStringLiteral(".") + filenameExtension);
dialog.setDefaultSuffix(QStringLiteral(".") + filenameExtension);
dialog.setMimeTypeFilters(supportedFilters);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment