[calligra/calligra/2.9] krita/ui: Don't add new layers to the group if it is locked

Dmitry Kazakov dimula73 at gmail.com
Thu Aug 13 17:15:18 UTC 2015


Git commit 437db48c329794f505097d547f2a828fae60682b by Dmitry Kazakov.
Committed on 13/08/2015 at 15:46.
Pushed by dkazakov into branch 'calligra/2.9'.

Don't add new layers to the group if it is locked

When you finished adding layers to the group just lock it and the
new layers will not be added to it anymore. They will be added as
sibling nodes.

Fixes T475
CC:kimageshop at kde.org

M  +3    -1    krita/ui/kis_layer_manager.cc

http://commits.kde.org/calligra/437db48c329794f505097d547f2a828fae60682b

diff --git a/krita/ui/kis_layer_manager.cc b/krita/ui/kis_layer_manager.cc
index c0e2973..c898f81 100644
--- a/krita/ui/kis_layer_manager.cc
+++ b/krita/ui/kis_layer_manager.cc
@@ -543,7 +543,9 @@ void KisLayerManager::adjustLayerPosition(KisNodeSP node, KisNodeSP activeNode,
     parent = activeNode;
     above = parent->lastChild();
 
-    while (parent && !parent->allowAsChild(node)) {
+    while (parent &&
+           (!parent->allowAsChild(node) || parent->userLocked())) {
+
         above = parent;
         parent = parent->parent();
     }



More information about the kimageshop mailing list