Commit 04deaee0 authored by Jouni Pentikäinen's avatar Jouni Pentikäinen

Fix reference image layer cloning

BUG: 395221
parent b8f9bbab
......@@ -80,7 +80,7 @@ KisReferenceImagesLayer::KisReferenceImagesLayer(KoShapeBasedDocumentBase* shape
{}
KisReferenceImagesLayer::KisReferenceImagesLayer(const KisReferenceImagesLayer &rhs)
: KisShapeLayer(rhs)
: KisShapeLayer(rhs, rhs.shapeController(), new ReferenceImagesCanvas(this, rhs.image()))
{}
KUndo2Command * KisReferenceImagesLayer::addReferenceImage(KisReferenceImage *referenceImage)
......
......@@ -164,13 +164,13 @@ KisShapeLayer::KisShapeLayer(const KisShapeLayer& rhs)
{
}
KisShapeLayer::KisShapeLayer(const KisShapeLayer& _rhs, KoShapeBasedDocumentBase* controller)
KisShapeLayer::KisShapeLayer(const KisShapeLayer& _rhs, KoShapeBasedDocumentBase* controller, KisShapeLayerCanvasBase *canvas)
: KisExternalLayer(_rhs)
, KoShapeLayer(new ShapeLayerContainerModel(this)) //no _rhs here otherwise both layer have the same KoShapeContainerModel
, m_d(new Private())
{
// copy the projection to avoid extra round of updates!
initShapeLayer(controller, _rhs.m_d->paintDevice);
initShapeLayer(controller, _rhs.m_d->paintDevice, canvas);
/**
* The transformaitons of the added shapes are automatically merged into the transformation
......
......@@ -58,7 +58,7 @@ public:
KisShapeLayer(KoShapeBasedDocumentBase* shapeController, KisImageWSP image, const QString &name, quint8 opacity);
KisShapeLayer(const KisShapeLayer& _rhs);
KisShapeLayer(const KisShapeLayer& _rhs, KoShapeBasedDocumentBase* controller);
KisShapeLayer(const KisShapeLayer& _rhs, KoShapeBasedDocumentBase* controller, KisShapeLayerCanvasBase *canvas = 0);
/**
* Merge constructor.
*
......
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