Bug 452056

Summary: When opening a file, activated layer styles may not be the same than the ones saved
Product: [Applications] krita Reporter: Konayachi <kona.yachiyachi+kde>
Component: layer stylesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Reproduction steps

Description Konayachi 2022-03-29 21:20:47 UTC
Created attachment 147830 [details]
Reproduction steps

SUMMARY
Activated Layer Style is not saved as is, after closing the file and reloading it again, the Layer Style is either deactivated or activated (different from the state when it was saved).


STEPS TO REPRODUCE
After saving the file with these certain states of LS (Layer Style) as explained in the matrix below, close the file, then reload the file again.

The LS states matrix:
            |  case 1  |  case 2  |
Group A     |  LS on   |  LS off  |
↳ Layer 1   |  LS off  |  LS on   |
↳ Layer 2   |  LS off  |  LS on   |

(See attached video for the demo)


OBSERVED RESULT
case 1
outcome = Group A LS changed from on to off, Layer 1 and Layer 2 LS remain off
LS are *deactivated* on both the group and the layers inside the group itself.

case 2
outcome = Group A LS changed from off to on, Layer 1 and Layer 2 LS remain on
LS are *activated* on both the group and the layers inside the group itself.


EXPECTED RESULT
Applied LS is activated on either on each layer, or on the group only.
Layers need to be inside the group.


SOFTWARE/OS VERSIONS

Device: Linux Mint 20.3 xfce
KDE Plasma Version: N/A
KDE Frameworks Version: N/A 
Qt Version: Unknown
Krita version: 5d2860885a (Also happens in 5.0.2)

ADDITIONAL INFORMATION
I only noticed this bug after I experienced the crash that is explained in bug 451771 (https://bugs.kde.org/show_bug.cgi?id=451771) but I am not sure whether this bug existed before that.
Comment 1 Halla Rempt 2025-05-30 09:40:17 UTC
I'm sorry, I missed this report. We've been fixing a number of issues with layer styles since 2022, and I can no longer reproduce this issue with 5.3.0 pre-alpha.