Skip to content

Remove old workaround for popup palette hiding

Mathias Wein requested to merge mwein/krita:popup-palette-bug-415106 into master

While investigating bug 415106 it turned out this is from a 10 year old workaround, and from what I can tell it is not required anymore.

If I understand the comments correctly, the issue was that when closing the popup palette by left-clicking on the canvas (that would normally start to paint) would add a newly selected color to the recently used color history. However, this code apparently has been refactored since then, the "TODO" in kis_tool_freehand.cc is gone and it does not signal that a color was used for painting until a paint stroke was actually completed.

At least I cannot reproduce such an issue anymore, the color histories in the Advanced Color Selector docker aswell as the popup palette work as expected for me on Linux.

I'm not 100% sure if there is some platform specific behavior in play, so the removal of that code needs some review and testing.

Test Plan

  • Select a new color in the popup palette
  • Close the palette by clicking on the canvas.
  • Open the palette again and make sure the color was not added to the history yet, only after you actually painted with it.
  • Make sure the Advanced Color Selector's color history behaves correctly too

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