Skip to content

Fix color of the shape being synched with the color selectors

Dmitry Kazakov requested to merge kazakov/vector-color-fix-381784 into master
  1. When the shape is selected, its color now loaded into the color selector
  2. If the shape was deselected without editing the color, then old color (before selection) is recovered back
  3. 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

  1. Create a shape layer with multiple shapes
  2. Try to select the shape. Their fg/bg color should be loaded into all color selectors
  3. 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.
  4. Test if bug 404975 is still not reproducible

What I need to know

  1. 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.

Merge request reports