Copy user data when a layer is duplicated

This commit is contained in:
David Capello 2015-12-11 15:11:34 -03:00
parent 8b5d013b03
commit 2fcd2b4013

View File

@ -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<const LayerImage*>(sourceLayer0);