Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@spaghetti22
Copy link
Contributor

This PR changes the logic for when the user is asked whether to flatten the image when saving.

The previous logic only asked this when the file had previously been saved in a non-flat format, but now in a flat format. This logic could lead to unexpected data loss: for example, if the user opened an existing PNG, created another layer, then saved and closed Pinta, the layer information would be lost. The same applies if the user was creating a new file with several layers, then saved it as a flat format. It's not good that the user ever loses layer information without being aware of this.

After these changes, the user is asked on any save of an image with multiple layers to a flat format whether they want to flatten it.

@cameronwhite
Copy link
Member

I'd be interested to hear others' opinions on this, but the existing behaviour was chosen because I was very concerned about annoying the user with extra prompts (#910).

Personally I'd prefer at least to have a "don't show this again" type of option on the dialog, since I'm already aware that .png wouldn't preserve my layers

@rolandixor
Copy link

I'd be interested to hear others' opinions on this, but the existing behaviour was chosen because I was very concerned about annoying the user with extra prompts (#910).

Personally I'd prefer at least to have a "don't show this again" type of option on the dialog, since I'm already aware that .png wouldn't preserve my layers

A "Do not show this again" checkbox would be okay, so long as there's a way to turn it back on (from a UX standpoint). Having the dialog popup every time this happens is a good thing in general though. It's easy for even experienced users to forget and accidentally lose data.

@spaghetti22
Copy link
Contributor Author

If truly necessary, I can try to implement a "do not show this again" checkbox.

But then, in order to not confuse the user, it would need to also affect cases where it would be shown even with the current logic.

I personally don't see much usefulness in such a checkbox. All it takes to confirm to flatten is one press of the "enter" key. It's literally just a change from having to press ctrl+s to having to press ctrl+s and then enter. I don't think many users will be annoyed by this.

@pedropaulosuzuki
Copy link
Contributor

If truly necessary, I can try to implement a "do not show this again" checkbox.

But then, in order to not confuse the user, it would need to also affect cases where it would be shown even with the current logic.

I personally don't see much usefulness in such a checkbox. All it takes to confirm to flatten is one press of the "enter" key. It's literally just a change from having to press ctrl+s to having to press ctrl+s and then enter. I don't think many users will be annoyed by this.

Agreed. I believe it's best to always show a prompt when destructive actions are performed. One prompt on save is something I doubt would annoy users that much.

Copy link
Member

@cameronwhite cameronwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks everyone, I'm fine to merge this since the consensus is to always show the dialog

Just had one minor suggestion in the comments for cleaning up some unused code

@cameronwhite cameronwhite merged commit a8a4c5b into PintaProject:master Dec 11, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not being prompted to flatten layers when saving in a format that doesn't support them (3.0 beta)

4 participants