Bug 440337 - Undelete option in tags popup isn't reset when needed
Summary: Undelete option in tags popup isn't reset when needed
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Mint (Ubuntu based) Linux
: NOR minor
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-27 20:17 UTC by Tiar
Modified: 2022-07-22 09:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

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