Bug 432488

Summary: Brush presets from user-imported bundles cannot be reloaded
Product: [Applications] krita Reporter: Anna Medonosova <anna.medonosova>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.4.2   
Target Milestone: ---   
Platform: Android   
OS: Android 10.x   
Latest Commit: Version Fixed In:

Description Anna Medonosova 2021-02-03 22:04:41 UTC
SUMMARY
Brush presets from user-imported bundles cannot be reloaded: clicking the "Reload preset" button does nothing.

Presets from the default bundles from Krita installation reload correctly.


STEPS TO REPRODUCE
1. Select a preset
2. Make changes to the preset (e.g. change size or opacity)
3. Click the "Reload preset" button (in the toolbar, in brush editor or in the popup palette)


OBSERVED RESULT
The preset is not reloaded.


EXPECTED RESULT
The preset is reloaded to original state.
Comment 1 Bug Janitor Service 2021-02-05 11:16:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/691
Comment 2 sh_zam 2021-02-08 12:46:05 UTC
Git commit b8f3d90ab432194ee06fc0df9a7dd162be5adde8 by Sharaf Zaman.
Committed on 08/02/2021 at 12:45.
Pushed by szaman into branch 'krita/4.3'.

Replace string in single pass

Buggy behavior:

Let's say filename = "/path/filename%2something.bundle" and
res = "favorite.kpp"

Then, QString("bundle://%1:%2").arg(filename).arg(res) would be replaced as:
bundle:///path/filenamefavorite.kppsomething.bundle:favorite.kpp

when it should be replaced as:
bundle:///path/filename%2something.bundle:favorite.kpp

M  +7    -7    libs/ui/KisResourceBundle.cpp

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