Bug 442888 - Tags saved in folder not loaded after recreating database
Summary: Tags saved in folder not loaded after recreating database
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tagging (show other bugs)
Version: 5.0.0-beta2
Platform: Other macOS
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-24 10:33 UTC by anno2300
Modified: 2022-02-21 19:09 UTC (History)
2 users (show)

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


Attachments
attachment-27791-0.html (1.34 KB, text/html)
2021-10-22 08:56 UTC, Wojciech Kosowicz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description anno2300 2021-09-24 10:33:32 UTC
SUMMARY
I noticed that Krita 5.0.0 beta1 does not load the new created tags stored in the folders using resource manager when I delete the database and krita has to recreate the database again. However, the tags i created and all defaults or fro bundles are saved as .tag files in the paintoppresets folder.

STEPS TO REPRODUCE
1. Create a new Tag like Custom Pencils
2. Add some Brushes into the Tag
3. Settings, Manage Resource, Save Tags to Folder
4. There is a Custom Pencils.tag the paintoppresets folder now, and a lot more.
5. Remove/rename the database resourcecache.sqlite to force krita for rebuilding database

OBSERVED RESULT
After krita rebuilds the resource database, it doensn't load the tags saved in the folder. Only tags by default and from bundles are loaded.

EXPECTED RESULT
Tags schould be loaded from .tag files

SOFTWARE/OS VERSIONS
macOS: 11.6
Comment 1 Halla Rempt 2021-09-29 12:00:49 UTC
Git commit ed74fee33080187f8c9dbd09e5efb995e3c8d567 by Halla Rempt.
Committed on 29/09/2021 at 12:00.
Pushed by rempt into branch 'master'.

Fix saving tag desktop files: the Tag entry was missing

M  +3    -3    libs/resources/KisFolderStorage.cpp
M  +1    -1    libs/resources/KisTag.cpp

https://invent.kde.org/graphics/krita/commit/ed74fee33080187f8c9dbd09e5efb995e3c8d567
Comment 2 Halla Rempt 2021-09-29 12:01:29 UTC
Git commit f15464962fd61a47b65a7b2ff31ddc0f357c7220 by Halla Rempt.
Committed on 29/09/2021 at 12:01.
Pushed by rempt into branch 'krita/5.0'.

Fix saving tag desktop files: the Tag entry was missing
(cherry picked from commit ed74fee33080187f8c9dbd09e5efb995e3c8d567)

M  +3    -3    libs/resources/KisFolderStorage.cpp
M  +1    -1    libs/resources/KisTag.cpp

https://invent.kde.org/graphics/krita/commit/f15464962fd61a47b65a7b2ff31ddc0f357c7220
Comment 3 anno2300 2021-10-12 12:07:14 UTC
I have to reopen this bug for beta2. It doesn't work to restore tags saved with the resource manager.

They are saved right in a file, and the file contains also the brushes saved in the tag. The tag is also reimported right after recreate the database. 
But: The tag doesn't contain any brushes from ANY Bundle, just brushes from local folder are reloaded correctly.
Comment 4 anno2300 2021-10-12 12:11:59 UTC
This behavior is the same with patterns and brushtips tags by the way.
Comment 5 Bug Janitor Service 2021-10-22 08:38:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1119
Comment 6 Wojciech Kosowicz 2021-10-22 08:56:47 UTC
Created attachment 142760 [details]
attachment-27791-0.html

pt., 22 paź 2021, 10:38 użytkownik Bug Janitor Service <
bugzilla_noreply@kde.org> napisał:

> https://bugs.kde.org/show_bug.cgi?id=442888
>
> Bug Janitor Service <bug-janitor@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|REOPENED                    |ASSIGNED
>
> --- Comment #5 from Bug Janitor Service <bug-janitor@kde.org> ---
> A possibly relevant merge request was started @
> https://invent.kde.org/graphics/krita/-/merge_requests/1119
>
> --
> You are receiving this mail because:
> You are watching all bug changes.
>
>
Comment 7 Halla Rempt 2021-12-16 10:52:31 UTC
Fixed in https://invent.kde.org/graphics/krita/-/merge_requests/1239
Comment 8 na7a5cha010 2022-02-21 19:09:48 UTC
Hello, I want to add something about this bug because its related, I don't know if i have to create a new one.

SUMMARY
When remove a tag from a brush preset and delete the 'resourcecache.sqlite', at reopen krita the brush its in the same tag. And if save tags to folder, its not updating the corresponding tag file

CASE 1

STEPS TO REPRODUCE
1. Remove a brush from a tag. ex: g)_Dry_Brushing.kpp in Favorites tag
2. Settings, Manage Resource, Save Tags to Folder

OBSERVED RESULTS
In the paintoppresets folder the Favorites.tag file still has the brush you removed

EXPECTED RESULTS
The '.tag' file should not have the removed tag

CASE 2

STEPS TO REPRODUCE
1. Remove a brush from a tag. ex: g)_Dry_Brushing.kpp in Favorites tag
2. Settings, Manage Resource, Save Tags to Folder
3. Close krita
4. Edit the Favorites.tag file in the resource directory paintoppresets folder, remove the name of the brush preset
5. Rename/delete 'resourcecache.sqlite' file in resource directory
6. Reopen krita to regenerate file

OBSERVED RESULTS
Krita loads the tags from the bundle instead the '.tag' file

EXPECTED RESULTS
Load the brushes from the '.tag' file that have the modifications

SOFTWARE/OS VERSION
Krita 5.0.2
windows 10 Home:  21H1