<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>445281</bug_id>
          
          <creation_ts>2021-11-10 15:32:52 +0000</creation_ts>
          <short_desc>Renamed MyPaint preset cannot be exported into a bundle (and loaded after restart)</short_desc>
          <delta_ts>2021-11-25 13:53:04 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Resource Management</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>release_blocker</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Kazakov">dimula73</reporter>
          <assigned_to name="amyspark">amy</assigned_to>
          <cc>amy</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/commit/a4f84ca9a3070ff4fe5949da3e8028fe131f3b26</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2076620</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2021-11-10 15:32:52 +0000</bug_when>
    <thetext>git sha1: e109a49e80eb47ffed80fafc9503e12a0af5d3df

STEPS TO REPRODUCE
1. Activate &quot;i)_Wet_Knife_Plus_(mypaint)&quot; preset in the editor, change it diameter to make is dirty
2. Click &quot;Save New Brush Preset&quot; and save it under &quot;i)_Wet_Knife_Plus_(mypaint)_Version2&quot;
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 &quot;/home/appimage/.local/share/krita/paintoppresets/i)_Wet_Knife_Plus_(mypaint)_Version2.kpp&quot; for reading
KoResourceSP KisResourceLocator::resource &quot;/home/appimage/.local/share/krita/&quot; &quot;paintoppresets&quot; &quot;i)_Wet_Knife_Plus_(mypaint)_Version2.kpp&quot; 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 &quot;Overwrite&quot; the preset to create a new version, then everything starts to work fine, the preset is saved under a proper name: &quot;i)_Wet_Knife_Plus_(mypaint)_Version2.0001.kpp&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2080659</commentid>
    <comment_count>1</comment_count>
    <who name="amyspark">amy</who>
    <bug_when>2021-11-25 13:49:30 +0000</bug_when>
    <thetext>Git commit 14e8cd88b267d0c083cb7bee693d02f684d022d6 by L. E. Segovia.
Committed on 25/11/2021 at 13:47.
Pushed by lsegovia into branch &apos;krita/5.0&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2080664</commentid>
    <comment_count>2</comment_count>
    <who name="amyspark">amy</who>
    <bug_when>2021-11-25 13:53:04 +0000</bug_when>
    <thetext>Git commit a4f84ca9a3070ff4fe5949da3e8028fe131f3b26 by L. E. Segovia.
Committed on 25/11/2021 at 13:50.
Pushed by lsegovia into branch &apos;master&apos;.

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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>