Bug 456194 - Align with Layer checkbox in Gradient Overlay deactivates itself when Layer Style is accessed again
Summary: Align with Layer checkbox in Gradient Overlay deactivates itself when Layer S...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: layer styles (show other bugs)
Version: 5.0.6
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 07:07 UTC by varkatope
Modified: 2023-03-17 00:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Minimum reproduction .kra with one broken layer and one working layer (267.27 KB, application/x-krita)
2022-07-01 07:07 UTC, varkatope
Details

Note You need to log in before you can comment on or make changes to this bug.
Description varkatope 2022-07-01 07:07:39 UTC
Created attachment 150312 [details]
Minimum reproduction .kra with one broken layer and one working layer

SUMMARY

Align with Layer checkbox in Gradient Overlay layer style unchecks itself and deactivates the option when Layer Styles is accessed again, and SOMETIMES (I know programmers love this word), this leads to the checkbox not being checkable again.


STEPS TO REPRODUCE
1. Create new project and add either a paint or vector layer.
2. Draw a shape.
3. Add a layer style to this layer and check Gradient overlay. Make sure a gradient is visible on the shape by adjusting scale and opacity.
4. Check Align with Layer and hit OK.
5. Move the shape around with the Move tool. The gradient should follow the shape.
6. Access the Layer Style properties again and go to Gradient Overlay (it would also be nice if the window opened back up on the last style you had open, by the way).

OBSERVED RESULT
Align with Layer should now be unchecked. Usually it can be checked again, but sometimes it stops being checkable, either after loading the file again, or just randomly after performing some other actions, not sure. In which case the gradient is also no longer tied to the shape and moving the shape no longer moves the layer style.

The uncheckable problem seems kind of random, but the Align with Layer definitely deactivates itself every time.

EXPECTED RESULT

The Align with Layer checkbox should stay checked, and should also not stop being checkable.


SOFTWARE/OS VERSIONS
Windows: 10 Home, 21H2 (up to date)

ADDITIONAL INFORMATION

Using 5.0.6 on Windows, but also tried the 5.1.0 beta also on Windows, and 5.0.8 on Manjaro Linux. 5.1.0 did fix a crash I was having with the layer styles, but the above problem remains.
Comment 1 varkatope 2022-07-08 03:37:33 UTC
Mistakenly reported this under Filter Layers, but it's a layer style bug.
Comment 2 Halla Rempt 2022-08-01 13:46:34 UTC
Thank you, I can confirm the issue.
Comment 3 Dmitry Chigiryov 2023-02-02 13:03:12 UTC
Problem still exists. It's easy to replicate. Align with layer in Layer styles is completely broken and almost never works.
Comment 4 Bug Janitor Service 2023-02-28 21:45:25 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1764
Comment 5 Tiar 2023-03-17 00:39:59 UTC
Git commit a84179a80bc8e74505455d0589d07b4cf4283b47 by Agata Cacko.
Committed on 17/03/2023 at 00:39.
Pushed by tymond into branch 'master'.

Don't forget 'align with layer' in gradient layer style

Before this commit, checking "Align with layer" in the gradient
overlay layer style would result only in temporary alignment
with the layer, and the checkbox would be unchecked next time
the user opens the dialog. The same was happening with the
gradient in the Stroke layer style.
This commit ensures the value of the checkbox will be remembered.

There is still potentially a problem with Stroke layer style
having only one boolean value for the "Align with layer" values in both
Gradient and Pattern, but it shouldn't be much trouble for the user
because this commit ensures that the value in the active stroke type
will be remembered correctly.

M  +14   -5    libs/ui/dialogs/kis_dlg_layer_style.cpp

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