Bug 440337

Summary: Undelete option in tags popup isn't reset when needed
Product: [Applications] krita Reporter: Tiar <tamtamy.tymona>
Component: Resource ManagementAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: minor CC: dimula73, wstephenson
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tiar 2021-07-27 20:17:06 UTC
SUMMARY
If you undelete a tag using a different method than tags tool button popup, it still appears on the "Undelete X" list.

STEPS TO REPRODUCE
1. Create tag "Test"
2. Delete tag "Test"
3. Create a new tag with the same name "Test"
4. Choose "Undelete" or "Replace" in the dialog

OBSERVED RESULT
There is still "Undelete Test" in the tags too button popup.

EXPECTED RESULT
No "Undelete Test" anywhere because it either has been undeleted, or it can't be undeleted anymore.

Note: this bug is minor because it doesn't crash Krita or anything, just switch to that tag. No bad results. And if you deleted the tag in a different/previous session, it won't appear.

SOFTWARE/OS VERSIONS
Krita

 Version: 5.0.0-prealpha (git a3e9ff5)
 Languages: en_US, en, en_US, en, en_US, en, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.12.8
  Version (loaded): 5.12.8
Comment 1 Will Stephenson 2021-12-15 08:25:21 UTC
Reproduced in b00b0063. 
If you recreate a deleted tag with the same name, a dialog prompts you whether to replace or restore the deleted tag, but the Undelete entry from the Tag menu in eg the Brush Presets docker is not removed in either case.
Comment 2 Dmitry Kazakov 2022-07-22 09:19:04 UTC
Git commit 5f5040ced979906bf0bf41c3ba71df1390c59be4 by Dmitry Kazakov.
Committed on 22/07/2022 at 09:18.
Pushed by dkazakov into branch 'master'.

Fix undelete button to disappear when the tag has already been recovered

M  +6    -1    libs/resources/KisTagModel.cpp
M  +40   -2    libs/resourcewidgets/KisTagChooserWidget.cpp
M  +2    -0    libs/resourcewidgets/KisTagChooserWidget.h
M  +6    -1    libs/resourcewidgets/KisTagToolButton.cpp
M  +1    -0    libs/resourcewidgets/KisTagToolButton.h

https://invent.kde.org/graphics/krita/commit/5f5040ced979906bf0bf41c3ba71df1390c59be4
Comment 3 Dmitry Kazakov 2022-07-22 09:19:25 UTC
Git commit e91e5d43c25db9d2cc434daa477c61868466865c by Dmitry Kazakov.
Committed on 22/07/2022 at 09:19.
Pushed by dkazakov into branch 'krita/5.1'.

Fix undelete button to disappear when the tag has already been recovered

M  +6    -1    libs/resources/KisTagModel.cpp
M  +40   -2    libs/resourcewidgets/KisTagChooserWidget.cpp
M  +2    -0    libs/resourcewidgets/KisTagChooserWidget.h
M  +6    -1    libs/resourcewidgets/KisTagToolButton.cpp
M  +1    -0    libs/resourcewidgets/KisTagToolButton.h

https://invent.kde.org/graphics/krita/commit/e91e5d43c25db9d2cc434daa477c61868466865c
Comment 4 Dmitry Kazakov 2023-08-21 14:53:35 UTC
Git commit ef90f573b4219549377ef94498b42941d6d04afc by Dmitry Kazakov.
Committed on 21/08/2023 at 16:53.
Pushed by dkazakov into branch 'master'.

Fix tag selector not to show the checkboxes next to each tag

We shouldn't use Qt::CheckStateRole, we have a special 'Active'
role for that.
Related: bug 473510

M  +5    -8    libs/resources/KisTagModel.cpp

https://invent.kde.org/graphics/krita/-/commit/ef90f573b4219549377ef94498b42941d6d04afc