Bug 441699 - New brushes that share a name with an old deleted brush aren't properly created
Summary: New brushes that share a name with an old deleted brush aren't properly created
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: 5.0.0-beta1
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-08-29 13:09 UTC by tomtomtomreportingin
Modified: 2021-09-01 09:29 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2021-08-29 13:09:46 UTC
SUMMARY
Newly saved brush presets aren't created properly if they share a name with an old deleted preset.

STEPS TO REPRODUCE
1. Create a brush named "Foobar".
2. Delete the brush through the brush settings.
3. Create a new brush named "Foobar".

OBSERVED RESULT
The new brush isn't created or at least isn't shown in the UI.

EXPECTED RESULT
Names of deleted brushes shouldn't break creation of future brushes.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.83.0
Qt Version: 5.12.11 (Appimage)
Comment 1 tomtomtomreportingin 2021-08-29 13:14:56 UTC
Presets renamed to old deleted brushes also disappear.
Comment 2 Tiar 2021-08-29 13:22:55 UTC
Could you please check the latest master, Krita Next (and then latest stable, Krita Plus) as well? Either me or Halla was already fixing that, I believe.
Comment 3 tomtomtomreportingin 2021-08-29 13:50:17 UTC
A couple missing brushes that I made for testing this bug reappear in nightly 4839c370, but the rest of them don't.

(Somehow after starting nightly 4839c370 a second time, I've suddenly attained the mypaint brush pack that I've been missing...)
Comment 4 tomtomtomreportingin 2021-08-29 14:07:52 UTC
Ah I should be more clear, the same behavior described in the bug report still happens as well.
Comment 5 Bug Janitor Service 2021-08-30 04:36:29 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 6 Halla Rempt 2021-08-30 13:04:43 UTC
It must've been broken again, I'm looking into it.
Comment 7 Halla Rempt 2021-09-01 09:28:37 UTC
Git commit 139d7441681f672d2a0967d0fa021b46c1c841d0 by Halla Rempt.
Committed on 01/09/2021 at 09:28.
Pushed by rempt into branch 'master'.

Fix saving a resource over an existing, but deleted resource

M  +80   -23   libs/resources/KisResourceModel.cpp
M  +1    -1    libs/ui/dialogs/KisDlgSavePreset.cpp

https://invent.kde.org/graphics/krita/commit/139d7441681f672d2a0967d0fa021b46c1c841d0
Comment 8 Halla Rempt 2021-09-01 09:29:55 UTC
Git commit 05ff8fdf2e902238ca70f36c4a2bd9e1f73db928 by Halla Rempt.
Committed on 01/09/2021 at 09:29.
Pushed by rempt into branch 'krita/5.0'.

Fix saving a resource over an existing, but deleted resource
(cherry picked from commit 139d7441681f672d2a0967d0fa021b46c1c841d0)

M  +80   -23   libs/resources/KisResourceModel.cpp
M  +1    -1    libs/ui/dialogs/KisDlgSavePreset.cpp

https://invent.kde.org/graphics/krita/commit/05ff8fdf2e902238ca70f36c4a2bd9e1f73db928