Bug 374345

Summary: Re-opening layer styles overwrites the gradient overlay.
Product: [Applications] krita Reporter: Luke <goodvibrato>
Component: layer stylesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: goodvibrato, halla, nicholaslapointe8
Priority: NOR    
Version First Reported In: 3.1.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Luke 2016-12-30 17:12:40 UTC
The gradient overlay in layer styles is overwritten if you close the file, re-open it, and then open the layer styles again.

Steps to reproduce:
1) Create a new document.
2) Use the elliptical selection tool and draw an ellipse on its own layer (with alpha).
3) Fill the selection with the foreground color.
4) Right click the layer to add a layer style.
5) Check the gradient overlay and add one of the default gradients with colors you'll remember.
6) Save and close the file.
7) Re-open the file. You should see the gradient you added.
8) Right click the layer to open the Layer Style again and quickly move the dialogue window out of the way if it's covering your circle.
9) You should immediately see the gradient change using the colors of the foreground and background.

I am on Windows 10 x64.
Comment 1 Nicholas LaPointe 2016-12-31 08:19:24 UTC
I can confirm. I also notice that the gradient stays reset even if the the Layer Style dialog is canceled after step 9.
Comment 2 Halla Rempt 2017-01-03 09:06:35 UTC
The Reverse check and blend mode is also not correctly restored from the config.
Comment 3 Halla Rempt 2017-03-14 08:49:39 UTC
Git commit 8fdf39f6957c3484c9751000ed3693901d7b309b by Boudewijn Rempt.
Committed on 14/03/2017 at 08:49.
Pushed by rempt into branch 'master'.

Disable copying the image before saving

The copy is incomplete, the copy doesn't copy the projection so
we need to re-render the image, which makes saving very slow, and
we're not saving in the background at this moment, so the copy
isn't useful.

Note: I have intentionally left the code intact, and added a warning.
Saving in the background is still todo.
Related: bug 375585

M  +8    -4    libs/ui/KisDocument.cpp

https://commits.kde.org/krita/8fdf39f6957c3484c9751000ed3693901d7b309b
Comment 4 Halla Rempt 2017-03-14 08:51:26 UTC
Git commit 50969d39d7e6712e8833a7e9db23a16c6c368f80 by Boudewijn Rempt.
Committed on 14/03/2017 at 08:51.
Pushed by rempt into branch 'krita/3.1'.

Disable copying the image before saving

The copy is incomplete, the copy doesn't copy the projection so
we need to re-render the image, which makes saving very slow, and
we're not saving in the background at this moment, so the copy
isn't useful.

Note: I have intentionally left the code intact, and added a warning.
Saving in the background is still todo.
Related: bug 375585

M  +7    -4    libs/ui/KisDocument.cpp

https://commits.kde.org/krita/50969d39d7e6712e8833a7e9db23a16c6c368f80