Commit 2cfe3745 authored by Eoin O'Neill's avatar Eoin O'Neill 🍀

Allow 'Add Clone Layer' to Work on Multiple Layers

This is a bugfix which allows multiple layers to be cloned simultaneously.

parent b1453b9d
......@@ -627,9 +627,15 @@ KisNodeSP KisLayerManager::addGroupLayer(KisNodeSP activeNode)
KisNodeSP KisLayerManager::addCloneLayer(KisNodeSP activeNode)
KisImageWSP image = m_view->image();
KisNodeSP node = new KisCloneLayer(activeLayer(),, image->nextLayerName(), OPACITY_OPAQUE_U8);
addLayerCommon(activeNode, node, true, 0);
return node;
KisNodeList selection = m_view->nodeManager()->selectedNodes();
KisNodeSP node, clonedNode;
Q_FOREACH (node, selection) {
KisNodeSP clonedNode = new KisCloneLayer(qobject_cast<KisLayer*>(,, image->nextLayerName(), OPACITY_OPAQUE_U8);
addLayerCommon(activeNode, clonedNode, true, 0 );
return clonedNode;
KisNodeSP KisLayerManager::addShapeLayer(KisNodeSP activeNode)
Markdown is supported
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