Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix group layers not being centered when a group is pasted into new document
Dmitry Kazakov49f87cf38f91
diff --git a/libs/ui/kis_mimedata.cpp b/libs/ui/kis_mimedata.cppindex 63e7f6d352..eda81e1bd8 100644--- a/libs/ui/kis_mimedata.cpp+++ b/libs/ui/kis_mimedata.cpp@@ -467,11 +467,9 @@ bool KisMimeData::insertMimeLayers(const QMimeData *data,if (changeOffset) {Q_FOREACH (KisNodeSP node, nodes) {KisLayerUtils::recursiveApplyNodes(node, [offset] (KisNodeSP node){- if (node->hasEditablePaintDevice()) {- KisPaintDeviceSP dev = node->paintDevice();- QPointF newOffset = offset + dev->offset();- dev->moveTo(newOffset.x(), newOffset.y());- }+ const QPoint newOffset(node->x() + offset.x(), node->y() + offset.y());+ node->setX(newOffset.x());+ node->setY(newOffset.y());});}}