Add Toggle Eraser Preset action
This action emulates switching between a pen tip and pen eraser, which switches between stored brush presets.
Test Plan
- Set a hotkey for "Toggle Eraser Preset" (for example, Shift+E) for triggering the action.
- Add the action to the toolbar for a visual indicator of whether it's checked.
- Select "brush" presets with the action unchecked and "eraser" presets with it checked, and check that triggering the action switches between them.
- Use a tablet pen with an eraser and check that it also behaves correctly, checking and unchecking the action when switching ends.
- Use a pen with an eraser and the hotkey interchangeably and check that it behaves correctly, without inconsistent presets or state.
- Restart Krita to see that the brush presets were stored and remembered correctly.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.