From 2fcd2b40137c09ea6b55cfc6165616af09aba397 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 11 Dec 2015 15:11:34 -0300 Subject: [PATCH] Copy user data when a layer is duplicated --- src/app/document.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/document.cpp b/src/app/document.cpp index 839e415ef..2f5474dd3 100644 --- a/src/app/document.cpp +++ b/src/app/document.cpp @@ -282,9 +282,10 @@ void Document::copyLayerContent(const Layer* sourceLayer0, Document* destDoc, La dstFlags = (LayerFlags)((int)dstFlags & ~(int)(LayerFlags::BackgroundLayerFlags)); } - // Copy the layer name + // Copy the layer name/flags/user data destLayer0->setName(sourceLayer0->name()); destLayer0->setFlags(dstFlags); + destLayer0->setUserData(sourceLayer0->userData()); if (sourceLayer0->isImage() && destLayer0->isImage()) { const LayerImage* sourceLayer = static_cast(sourceLayer0);