Skip to content

WIP: add dialog to change clone layers' source

Tusooa Windy requested to merge tusooaw/krita:master into master

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:

  1. Create a document. There is already a layer named Background.
  2. Add a Paint Layer. Name it Paint 1. Put it above Background. Paint something on it.
  3. Add a Group Layer. Name it Group 1. Put it above Paint 1.
  4. Add a Group Layer inside Group 1. Name it Group 2.
  5. Add a Clone Layer of Paint 1 inside Group 2. Name it Clone 1. Move it to somewhere far away from the content of Paint 1.
  6. Add a Paint Layer inside Group 2. Name it Paint 2. Put it above Clone 1. Paint something on it, far away from the content of other layers.
  7. Add a Paint Layer above Group 2. Name it Paint 3. Paint something on it, far away from the content of other layers.
  8. Add a Clone Layer of Paint 2 above Paint 3. Name it Clone 2. Move it away from the content of other layers.
  9. In Layers Docker, click Clone 1. Hold shift and click Clone 2.
  10. In Layers Docker, right click Clone 1. (Test whether actions are correctly added.) Expected: the context menu has an action named Set Copy From.
  11. 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
  1. Choose Paint 3. Click OK. (Test effects and display.) Expected: The copy from property of Clone 1 and Clone 2 changes to Paint 3. The clones are displayed correctly. (No colour blobs from Paint 1)
  2. Undo. (Test undo command.) Expected: The copy from property of Clone 1 changes to Paint 1. That of Clone 2 changes to Paint 2. The clones are displayed correctly.

TODO:

  1. Allow changing the source of multiple Clone Layers.
  2. Circular dependency check.
Edited by Tusooa Windy

Merge request reports