mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 21:19:18 +00:00
Copy user data when a layer is duplicated
This commit is contained in:
parent
8b5d013b03
commit
2fcd2b4013
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user