Bug 374451 - Deleting a saved brush preset tag removes it only from the top combo box
Summary: Deleting a saved brush preset tag removes it only from the top combo box
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-02 08:44 UTC by Bruno P. Kinoshita
Modified: 2017-01-03 11:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (421 bytes, patch)
2017-01-02 08:44 UTC, Bruno P. Kinoshita
Details

Note You need to log in before you can comment on or make changes to this bug.
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