Patch to implement resource categorization via tags

Sven Langkamp sven.langkamp at
Tue May 14 16:33:52 UTC 2013

On Tue, May 14, 2013 at 5:13 PM, <s_suelzer at> wrote:

> Hi. :)
> I've attached a patch that improves the way the user can organize
> resources into named sets that can be added, deleted and chosen from a
> drop down menu that I've added to KoResourceItemChooser. This made the
> changes available to the paintoppreset choosers, the gradient choosers
> and the pattern choosers.
> Currenly only adding and deleting categories is supported, renaming them
> is in the code but lacks an UI feature, which I was unable to implement.
> (I wanted the unfiltered view to be immutable and tried dis and enabling
> the editable state of the drop down box based on which index was active,
> but that introduced a segfault.)
> I have removed the `show all' checkbox in the paintop preset docker and
> all references to that functionality since it made filtering a bit more
> complicated as well as just not making too much sense with the
> improvements to the tagging system.
> I have also removed the proxy adapter in KisPresetChooser since it
> didn't do anything useful after these changes, yet required attention
> since it overloaded some now improved functions.
> Current shortcomings of the system:
> Since I used the already existing KoResourceTagging class to handle all
> the tagging bits, and ultimaltely save tags to disk, in alphabetical
> order, restarting Krita, and thus repopulating the combo boxes also
> fills them in alphabetical order and not in the order they might have
> been defined by the user.
> I also had a crash at one point in time where some brush presets got
> changed around in master and clicking some resources in the brush preset
> box crashed the program, but I was not able to reproduce that after a
> clean rebuild of my local workspace and changing presets around
> externally, so it might not be an issue, but for completeness sake ;).
> And that's it.
> Cheers~!

Overall pretty nice work.

There are a few minor things I spotted:

- that empty slot in PresetDockerDock can be removed completely including
the connections
- there were some coding styles issues with missing spaces between methods
- KoPresetFiltering has a misleading name, at that level we don't have
presets just resources
- some strings are missing the i18n() around it
- this does a bit to much in one line, I think: dirty? ++m_changeCounter :
m_oldChangeCounter = m_changeCounter;

As this is a Calligra wide change, it should go through reviewboard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kimageshop mailing list