Bug 382080 - Exporting the second file in a row doesn't suggest a correct file name
Summary: Exporting the second file in a row doesn't suggest a correct file name
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: git master (please specify the git hash!)
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-06 22:12 UTC by Dmitry Kazakov
Modified: 2017-07-07 12:22 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2017-07-06 22:12:05 UTC
1) Open file AAA.kra
2) Press File->Export. Krita suggests to export it as AAA.kra (which is correct)
3) Export it as AAA.png
4) In the same Krita run open file BBB.kra
5) Press File->Export

Now Krita suggests to Export it as AAA.png again! I would expect Krita to suggest saving it as BBB.png

That happens because in KisMainWindow::saveDocument() we save both lastExportUrl and lastExportMimeType, and reuse them after the first save. I would expect it to save mime type only.

WISHGROUP: Small Usability Fixes
Comment 1 Halla Rempt 2017-07-07 08:40:16 UTC
Not quite. lastExportUrl is used to make sure the export goes to the last used directory, but since KoFileDialog is hopelessly confused it also sets the filename.
Comment 2 Halla Rempt 2017-07-07 12:22:30 UTC
Git commit 7dcfbbdcb1a2b5fdc5f7c6f237c6c55eca86cc83 by Boudewijn Rempt.
Committed on 07/07/2017 at 12:22.
Pushed by rempt into branch 'master'.

Be smarter about remembering the last used save location
Related: bug 353433

M  +1    -1    libs/impex/ColorModelCheck.h
M  +3    -0    libs/koplugin/KisMimeDatabase.cpp
M  +48   -44   libs/ui/KisMainWindow.cpp
M  +17   -16   libs/widgetutils/KoFileDialog.cpp
M  +1    -1    libs/widgetutils/KoFileDialog.h

https://commits.kde.org/krita/7dcfbbdcb1a2b5fdc5f7c6f237c6c55eca86cc83