Skip to content

Bug fix: Eraser tool does not initialize to last-used mode#839

Merged
cameronwhite merged 1 commit into
PintaProject:masterfrom
logiclrd:JDG_EraserToolInitializeMode
Jun 4, 2024
Merged

Bug fix: Eraser tool does not initialize to last-used mode#839
cameronwhite merged 1 commit into
PintaProject:masterfrom
logiclrd:JDG_EraserToolInitializeMode

Conversation

@logiclrd

@logiclrd logiclrd commented Jun 2, 2024

Copy link
Copy Markdown
Contributor

There is a combobox which does initialize to the last-used mode, but the value doesn't actually get stashed into the tool's state, so until you interact with it, it's still in the default state. In practice, this means that if you use the eraser tool and set it to Smooth mode, then you restart Pinta, the combo box remembers that it should be in Smooth mode, but the tool initially operates in Normal mode.

This PR sets the tool's state to match the value loaded into the combo box.

@cameronwhite

Copy link
Copy Markdown
Member

Thanks for catching this!

Would it also work to instead just swap the ordering of the existing code, ie. adding the OnChanged event first so that it handles updating eraser_type when initializing the combobox?

@logiclrd

logiclrd commented Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

Good question, I'll check :-)

… initializing it to the saved eraser type, so that eraser_type gets set to that value during initialization.
@logiclrd logiclrd force-pushed the JDG_EraserToolInitializeMode branch from dd7eada to de85e86 Compare June 3, 2024 04:54
@logiclrd

logiclrd commented Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

Seems to work :-)

@cameronwhite cameronwhite merged commit f880a95 into PintaProject:master Jun 4, 2024
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.

2 participants