Skip to content

Draft: Fix color palette editing

Mathias Wein requested to merge mwein/krita:palette_fixes into master

This attempts to fix a number of bugs with color palettes

Most of these bugs are assigned to @rempt, but she seems busy with other things, and 478715 (hang/crash from infinite recursion) was bad enough that I decided to look into it myself.

So far, this should fix these:

BUG:461521 BUG:476589 BUG:476607 BUG:478715

Basically, I came to the conclusion that KoColorSet just needs a few more specific signals to be suitable as input to a QAbstractItemModel at all, unless you strictly limit access to one model instance globally. A bunch of dirty tricks were used to somehow get around this problem, which eventually lead to the point where nothing works properly anymore at all.

There's a few more things especially around the undo/redo that is hidden until now (this MR unhides the buttons, but mostly for testing purpose). But also KisPaletteComboBox gives me the creeps...

Test Plan

(TODO)

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.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports

Loading