Bug 446801 - "Show deleted resources" checkbox doesn't work if the tag other than "All" is selected
Summary: "Show deleted resources" checkbox doesn't work if the tag other than "All" is...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (other bugs)
Version First Reported In: 5.0.0-beta5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-10 20:13 UTC by sh_zam
Modified: 2021-12-15 12:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sh_zam 2021-12-10 20:13:02 UTC
STEPS TO REPRODUCE
1. Open Resource Manager
2. Delete a random tagged preset
3. Select the tag of the deleted preset in the combo-box.
4. Check/Uncheck "Show deleted resources"

OBSERVED RESULT
It has no effect on the preset's visibility, even though the preset _is_ marked as deleted. Another symptom of the same bug seems to be that you can't delete 

EXPECTED RESULT
View should be updated accordingly.

ADDITIONAL INFORMATION
Krita Version: ./krita-5.0.0-beta5-e18c9f0-x86_64.appimage
Comment 1 Dmitry Kazakov 2021-12-14 13:32:50 UTC
I can reproduce the issue here. The resource is visible in the tagged model even when it is deleted.
Comment 2 Dmitry Kazakov 2021-12-14 13:34:37 UTC
When the resource is filtered via some text string, the checkbox starts to work perfectly :)
Comment 3 Bug Janitor Service 2021-12-14 14:29:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1232
Comment 4 Dmitry Kazakov 2021-12-15 12:36:18 UTC
Git commit 0b1636444fc5ce1c164c6da8dd477bb76714b06d by Dmitry Kazakov.
Committed on 15/12/2021 at 12:35.
Pushed by dkazakov into branch 'master'.

WIP: Fix "Show deleted resources" button in the Resources Manager

KisTagFilterResourceProxyModel internally owns two separate models
that are switches depending on the current filter settings. When we
change the settings for "show deleted resoruces", we sould cahnge
that in both internal models.

M  +18   -0    libs/resources/KisTagFilterResourceProxyModel.cpp
M  +16   -0    libs/resources/KisTagFilterResourceProxyModel.h
M  +5    -4    plugins/extensions/resourcemanager/DlgResourceManager.cpp

https://invent.kde.org/graphics/krita/commit/0b1636444fc5ce1c164c6da8dd477bb76714b06d
Comment 5 Dmitry Kazakov 2021-12-15 12:57:37 UTC
Git commit d16994a3a59c69bf19551f6665e33607785eddac by Dmitry Kazakov.
Committed on 15/12/2021 at 12:41.
Pushed by dkazakov into branch 'krita/5.0'.

WIP: Fix "Show deleted resources" button in the Resources Manager

KisTagFilterResourceProxyModel internally owns two separate models
that are switches depending on the current filter settings. When we
change the settings for "show deleted resoruces", we sould cahnge
that in both internal models.

M  +18   -0    libs/resources/KisTagFilterResourceProxyModel.cpp
M  +16   -0    libs/resources/KisTagFilterResourceProxyModel.h
M  +5    -4    plugins/extensions/resourcemanager/DlgResourceManager.cpp

https://invent.kde.org/graphics/krita/commit/d16994a3a59c69bf19551f6665e33607785eddac