Commit bccda781 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix layer duplication handle locked layers properly

parent fe9741d2
......@@ -476,6 +476,13 @@ struct DuplicateLayers : public KisCommandUtils::AggregateCommand {
if (filteredNodes.isEmpty()) return;
KisNodeSP newAbove = filteredNodes.last();
// make sure we don't add the new layer into a locked group
while (newAbove->parent() && !newAbove->parent()->isEditable()) {
newAbove = newAbove->parent();
KisNodeSP newParent = newAbove->parent();
// override parent if provided externally
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment