Bug 445281 - Renamed MyPaint preset cannot be exported into a bundle (and loaded after restart)
Summary: Renamed MyPaint preset cannot be exported into a bundle (and loaded after res...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: amyspark
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2021-11-10 15:32 UTC by Dmitry Kazakov
Modified: 2021-11-25 13:53 UTC (History)
1 user (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 Dmitry Kazakov 2021-11-10 15:32:52 UTC
git sha1: e109a49e80eb47ffed80fafc9503e12a0af5d3df

STEPS TO REPRODUCE
1. Activate "i)_Wet_Knife_Plus_(mypaint)" preset in the editor, change it diameter to make is dirty
2. Click "Save New Brush Preset" and save it under "i)_Wet_Knife_Plus_(mypaint)_Version2"
3. Try to create a bundle with this new preset. It fails.
4) After restarting Krita there will be a lot of warnings that this preset cannot be found/loaded

```
Could not open "/home/appimage/.local/share/krita/paintoppresets/i)_Wet_Knife_Plus_(mypaint)_Version2.kpp" for reading
KoResourceSP KisResourceLocator::resource "/home/appimage/.local/share/krita/" "paintoppresets" "i)_Wet_Knife_Plus_(mypaint)_Version2.kpp" was not found
```

The problem is that the preset is saved under a wrong name: i)_Wet_Knife_Plus_(mypaint)_Version2.kpp.myb

If you "Overwrite" the preset to create a new version, then everything starts to work fine, the preset is saved under a proper name: "i)_Wet_Knife_Plus_(mypaint)_Version2.0001.kpp"
Comment 1 amyspark 2021-11-25 13:49:30 UTC
Git commit 14e8cd88b267d0c083cb7bee693d02f684d022d6 by L. E. Segovia.
Committed on 25/11/2021 at 13:47.
Pushed by lsegovia into branch 'krita/5.0'.

Fix naming of MyPaint brushes on versioned serialization

Before this commit, versioned .myb files would apply the .kpp suffix,
only to be overridden by the save preset dialog.
Related: bug 445282, bug 439817

M  +5    -6    libs/ui/dialogs/KisDlgSavePreset.cpp
M  +6    -4    plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp
M  +0    -7    plugins/paintops/mypaint/MyPaintPaintOpPreset.h

https://invent.kde.org/graphics/krita/commit/14e8cd88b267d0c083cb7bee693d02f684d022d6
Comment 2 amyspark 2021-11-25 13:53:04 UTC
Git commit a4f84ca9a3070ff4fe5949da3e8028fe131f3b26 by L. E. Segovia.
Committed on 25/11/2021 at 13:50.
Pushed by lsegovia into branch 'master'.

Fix naming of MyPaint brushes on versioned serialization

Before this commit, versioned .myb files would apply the .kpp suffix,
only to be overridden by the save preset dialog.
Related: bug 445282, bug 439817
(cherry picked from commit 14e8cd88b267d0c083cb7bee693d02f684d022d6)

M  +5    -6    libs/ui/dialogs/KisDlgSavePreset.cpp
M  +6    -4    plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp
M  +0    -7    plugins/paintops/mypaint/MyPaintPaintOpPreset.h

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