Fix color of the shape being synched with the color selectors
- When the shape is selected, its color now loaded into the color selector
- If the shape was deselected without editing the color, then old color (before selection) is recovered back
- If the shape is deselected after its color was modified in any way, then the newly selected color is kept in the selector.
The patch fixes: https://bugs.kde.org/show_bug.cgi?id=381784
The patch may break a fix for bug: https://bugs.kde.org/show_bug.cgi?id=404975
Test Plan
- Create a shape layer with multiple shapes
- Try to select the shape. Their fg/bg color should be loaded into all color selectors
- Try to deselect shapes. The old color should be recovered on the color selector (unless you did any manual changes of the color, in which case the color will be kept.
- Test if bug 404975 is still not reproducible
What I need to know
- Is the UIX of old color recovery on shape deselection works as expected? Is it what the painters need? Or they would prefer some other approach?
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.