WIP: add dialog to change clone layers' source
Moved to https://invent.kde.org/kde/krita/merge_requests/21
This patch allows users to change the copyFrom
property of Clone Layers through Layers Docker.
Test Plan:
- Create a document. There is already a layer named
Background
. - Add a Paint Layer. Name it
Paint 1
. Put it aboveBackground
. Paint something on it. - Add a Group Layer. Name it
Group 1
. Put it abovePaint 1
. - Add a Group Layer inside
Group 1
. Name itGroup 2
. - Add a Clone Layer of
Paint 1
insideGroup 2
. Name itClone 1
. Move it to somewhere far away from the content ofPaint 1
. - Add a Paint Layer inside
Group 2
. Name itPaint 2
. Put it aboveClone 1
. Paint something on it, far away from the content of other layers. - Add a Paint Layer above
Group 2
. Name itPaint 3
. Paint something on it, far away from the content of other layers. - Add a Clone Layer of
Paint 2
abovePaint 3
. Name itClone 2
. Move it away from the content of other layers. - In Layers Docker, click
Clone 1
. Hold shift and clickClone 2
. - In Layers Docker, right click
Clone 1
. (Test whether actions are correctly added.) Expected: the context menu has an action namedSet Copy From
. - Click
Set Copy From
. (Test whether invalid targets are hidden.) Expected: A pop-up dialog appears. There is a Combo Box inside the dialog. The items in the combo box are:
- Paint 3
- Paint 2
- Paint 1
- Background
- Choose
Paint 3
. ClickOK
. (Test effects and display.) Expected: Thecopy from
property ofClone 1
andClone 2
changes toPaint 3
. The clones are displayed correctly. (No colour blobs fromPaint 1
) - Undo. (Test undo command.)
Expected: The
copy from
property ofClone 1
changes toPaint 1
. That ofClone 2
changes toPaint 2
. The clones are displayed correctly.
TODO:
Allow changing the source of multiple Clone Layers.Circular dependency check.
Edited by tusooa the west wind