PintaProject / Pinta

Simple GTK# Paint Program
http://www.pinta-project.com/
MIT License
1.74k stars 267 forks source link

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

Closed logiclrd closed 1 month ago

logiclrd commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

Good question, I'll check :-)

logiclrd commented 1 month ago

Seems to work :-)