Bug 474396 - No save dialog when closing minimized documents in subwindow mode
Summary: No save dialog when closing minimized documents in subwindow mode
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: openSUSE Linux
: NOR grave
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2023-09-11 05:22 UTC by apelsinchoklad
Modified: 2023-09-11 14:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description apelsinchoklad 2023-09-11 05:22:55 UTC
SUMMARY
When closing a minimized document in subwindow mode, no save dialog is shown, causing loss of any changes made to a document. Either by pressing close button in subwindow frame or by menu/keyboard shortcut. 

On my machine the bug is present in krita-5.1.5-x86_64.appimage, krita-5.2.0-beta2-ebc38827e2-x86_64.appimage,  krita-5.3.0-prealpha-f46c04aa3e-x86_64.appimage and also on macOS with Krita 5.1.5 and 5.2 beta2.


STEPS TO REPRODUCE
1. Activate subwindow mode in settings
2. Create a new document and draw something
3. If on macOS: Create another new document and draw something
4. Minimize document(s) and close them.

OBSERVED RESULT
Documents close and no save dialog is displayed

EXPECTED RESULT
Save dialog

SOFTWARE/OS VERSIONS
macOS: 10.13.6
Linux/KDE Plasma: openSUSE Tumbleweed 20230828
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Comment 1 Dmitry Kazakov 2023-09-11 11:27:08 UTC
I can confirm this bug on Windows. And since it is a data-loss, I will also escalate it to a release_blocker status.
Comment 2 Dmitry Kazakov 2023-09-11 11:29:24 UTC
This is a regression caused by a318e3f9491f773d09c452b1b3681f71d3152009, which was a bugfix for bug 392930
Comment 3 Dmitry Kazakov 2023-09-11 14:15:46 UTC
Git commit 95a2e1a8b70410e0381274d13cd78ea7df486acc by Dmitry Kazakov.
Committed on 11/09/2023 at 16:07.
Pushed by dkazakov into branch 'krita/5.2'.

Don't allow closing hidden document views without confirmation

The original fix was supposed to ease the multimonitor layouts somehow,
but it seems like the feature is just broken and this check does not
really change much.
Related: bug 392930

Original bug whose fix caused the issue:

M  +2    -2    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/-/commit/95a2e1a8b70410e0381274d13cd78ea7df486acc
Comment 4 Dmitry Kazakov 2023-09-11 14:16:03 UTC
Git commit 74fd46e4238390c20f703a16ea5dde826bfbc747 by Dmitry Kazakov.
Committed on 11/09/2023 at 16:07.
Pushed by dkazakov into branch 'krita/5.2'.

Don't hide already hidden main windows

That causes unbalanced show/hide events to be delivered, which is not
particularily a bug, but makes our life much more complicated.

M  +3    -1    libs/ui/KisWindowLayoutResource.cpp

https://invent.kde.org/graphics/krita/-/commit/74fd46e4238390c20f703a16ea5dde826bfbc747
Comment 5 Dmitry Kazakov 2023-09-11 14:16:30 UTC
Git commit 1c0f18bc706889a9e02183e462fd37cf4f7e1d3c by Dmitry Kazakov.
Committed on 11/09/2023 at 16:16.
Pushed by dkazakov into branch 'master'.

Don't allow closing hidden document views without confirmation

The original fix was supposed to ease the multimonitor layouts somehow,
but it seems like the feature is just broken and this check does not
really change much.
Related: bug 392930

Original bug whose fix caused the issue:

M  +2    -2    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/-/commit/1c0f18bc706889a9e02183e462fd37cf4f7e1d3c
Comment 6 Dmitry Kazakov 2023-09-11 14:16:34 UTC
Git commit 15f4024296fd720b5c03b7a6f9676bfd71bcf6c0 by Dmitry Kazakov.
Committed on 11/09/2023 at 16:16.
Pushed by dkazakov into branch 'master'.

Don't hide already hidden main windows

That causes unbalanced show/hide events to be delivered, which is not
particularily a bug, but makes our life much more complicated.

M  +3    -1    libs/ui/KisWindowLayoutResource.cpp

https://invent.kde.org/graphics/krita/-/commit/15f4024296fd720b5c03b7a6f9676bfd71bcf6c0