-
Notifications
You must be signed in to change notification settings - Fork 333
Handle dirty state correctly when closing document #1656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Handle dirty state correctly when closing document #1656
Conversation
|
Thanks for investigating this!
I'm thinking we should also go further though and remove the
This would avoid adding the "Finalize" history item if the user decides to cancel closing the document, for example: Screen.Recording.2025-08-09.at.10.19.50.AM.mp4 |
…one that and this prevents adding an additional Finalize history item
573dcb7 to
9fe48ac
Compare
|
Thank you! I didn't catch that detail. I wonder why this call was added in the With the call to |
|
While trying to replicate the example in your screen recording, I noticed that upon canceling or saving the current tab, the shape is Finalized and added to the other tab that is already opened. This is a bug that seems like it was there before the changes in this PR, but it seems like a pretty bad one. I proposed a fix in e8a281e This fix and the fix for Finalize above can probably be split into a separate PR if needed. So far, these are the changes in this PR:
|
|
It looks like there are some merge conflicts, so I suspect your branch is behind the latest I wasn't able to reproduce the Would you also maybe be able to record a screen grab of the other issue with |
Fixes https://bugs.launchpad.net/pinta/+bug/1435226
The implementation was committing tool state first, which can finalize editable shapes and push a history item, marking the document dirty right before closing.
This was changed so that:
This prevents creating a last-second history item that triggers the prompt after a successful save.
Tested locally the fact that the bug was still reproducing before the change and does not reproduce after this. The image is still correctly saved after using any tool, saving and closing the app.