Bug 374451

Summary: Deleting a saved brush preset tag removes it only from the top combo box
Product: [Applications] krita Reporter: Bruno P. Kinoshita <brunodepaulak>
Component: Resource ManagementAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch

Description Bruno P. Kinoshita 2017-01-02 08:44:15 UTC
Created attachment 103139 [details]
patch

If you create a tag (e.g. test), it will be available in the top combo box, and also in the pop-up widget. You can use the combo box to filter the tags, or the pop-up to add a brush to the tag you created.

When you delete the tag, it gets removed from the combo box correctly. In other words, after you delete the tag, by expanding the options in the top combo box, the tag deleted will be gone for good.

However, the tag will be still available if you use the pop-up widget. Here's a GIF illustrating it: http://i.imgur.com/zJWOOgE.gif

It gets more interesting. If you do use that value, as you removed it from the combo box, it will be re-created, and thus you will end up with duplicated values in your pop-up widget, but unique values in the combo-box (as you already removed it).

Here's another GIF showing the duplicate values: http://i.imgur.com/ELUvKU0.gif

The attached patch simply tells the combo box element to remove the tag from its list of tags available. This same list is shared with the widget. By doing so, the bug is gone, and I don't have duplicate values any more in the pop-up, and the combo-box keeps working fine as before.

Found it while trying to reproduce 359854; not sure if related (didn't really understand the issue, and couldn't reproduce it), so created a new issue.

Hope it helps
Bruno
Comment 1 Halla Rempt 2017-01-03 11:57:42 UTC
Git commit 0fb90cf41e82b3760fdea99118db42cee7e978a0 by Boudewijn Rempt.
Committed on 03/01/2017 at 11:57.
Pushed by rempt into branch 'master'.

Patch by Bruno Kinoshita. Thanks!

M  +1    -0    libs/widgets/KoTagChooserWidget.cpp

https://commits.kde.org/krita/0fb90cf41e82b3760fdea99118db42cee7e978a0
Comment 2 Halla Rempt 2017-01-03 11:57:55 UTC
Git commit e6788eca2509e059c745b5699b3aca92c2262daa by Boudewijn Rempt.
Committed on 03/01/2017 at 11:57.
Pushed by rempt into branch 'krita/3.1'.

Patch by Bruno Kinoshita. Thanks!

M  +1    -0    libs/widgets/KoTagChooserWidget.cpp

https://commits.kde.org/krita/e6788eca2509e059c745b5699b3aca92c2262daa