Bug 410970 - Moving a layer to the top position of a group will move the layer out of the group
Summary: Moving a layer to the top position of a group will move the layer out of the ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.2.3
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-16 07:41 UTC by jimbo
Modified: 2020-08-18 13:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jimbo 2019-08-16 07:41:00 UTC
SUMMARY


STEPS TO REPRODUCE
1. Create multiple layers and group them
2. Move the bottom layer to the top of the group (small blue line, not the thick blue line)

OBSERVED RESULT
The selected layer doesn't move to the top, instead it leaves the group

EXPECTED RESULT
The layer moves to the top of the group and stays inside it

SOFTWARE/OS VERSIONS
Windows: 7 Professional x64

ADDITIONAL INFORMATION
When adding a layer from outside the group to the top position within the group the behaviour is inconsistent, sometimes adding it as expected and other times it will stay outside of the group
Comment 1 Raghavendra kamath 2019-08-16 07:59:13 UTC
Just adding some information here, it seems there are two thick lines that appear , one is slightly below the other, if you drop using the line which is slightly down , it will stay inside the group.
Comment 2 Dmitry Kazakov 2019-08-16 08:10:57 UTC
Perhaps we should just use a different length of the layer insert position marker, depending on where the layer is going to be inserted? Like, if we insert it into the group, then marker is short. If we are going to insert it into the parent layer, then the marker is long...
Comment 3 Halla Rempt 2019-08-27 12:30:50 UTC
Do we actually draw these markers ourselves?
Comment 4 Dmitry Kazakov 2020-08-18 13:21:24 UTC
Git commit c6ac82b4561267493a54631d43a83d1f0afe9b97 by Dmitry Kazakov.
Committed on 18/08/2020 at 13:20.
Pushed by dkazakov into branch 'krita/4.3'.

Fix drop indicator rendering for the layers

NodeView::visualRect() is used by Qt for rendering the drop indicator.
All other metrics are calculated by NodeDelegate manually using the
unmodified NodeView::originalVisualRect() call.

M  +16   -4    plugins/dockers/layerdocker/NodeView.cpp

https://invent.kde.org/graphics/krita/commit/c6ac82b4561267493a54631d43a83d1f0afe9b97
Comment 5 Dmitry Kazakov 2020-08-18 13:21:55 UTC
Git commit 38de1ea6d522ae5c6e79251943a558230cbe0fc8 by Dmitry Kazakov.
Committed on 18/08/2020 at 13:21.
Pushed by dkazakov into branch 'master'.

Fix drop indicator rendering for the layers

NodeView::visualRect() is used by Qt for rendering the drop indicator.
All other metrics are calculated by NodeDelegate manually using the
unmodified NodeView::originalVisualRect() call.

M  +16   -4    plugins/dockers/layerdocker/NodeView.cpp

https://invent.kde.org/graphics/krita/commit/38de1ea6d522ae5c6e79251943a558230cbe0fc8