Enable palette docker's buttons if color set is not null
Krita tries to recall the last color palette from the previous session. If it can't find the color palette, it disables the palette docker's buttons, but if a color palette is subsequently selected, it will not re-enable the buttons.
This MR aims to address that issue by setting the buttons' enabled states to (bool)colorSet
.
Test Plan
- Create a new krita document
- Add a new color palette and check "Save Palette in the Current Document"
- Make sure that the palette has a unique name. A warning should pop up if it doesn't.
- With the new palette as the currently selected color palette, save the document, restart Krita, and open the document back up
- Select a color palette from the palette chooser
- Test some of the palette docker's buttons to see if they are enabled
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.
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.
Edited by Mike Will