mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-29 18:20:44 +00:00
Copy the background layer as background when a document is duplicated
This commit is contained in:
parent
7632e83046
commit
8dff8a979d
@ -403,7 +403,12 @@ Document* Document::duplicate(DuplicateType type) const
|
||||
|
||||
case DuplicateExactCopy:
|
||||
// Copy the layer folder
|
||||
copyLayerContent(sprite()->folder(), documentCopy, spriteCopy->folder());
|
||||
copyLayerContent(sourceSprite->folder(), documentCopy, spriteCopy->folder());
|
||||
|
||||
if (sourceSprite->backgroundLayer() != NULL) {
|
||||
ASSERT(spriteCopy->folder()->getFirstLayer());
|
||||
static_cast<LayerImage*>(spriteCopy->folder()->getFirstLayer())->configureAsBackground();
|
||||
}
|
||||
break;
|
||||
|
||||
case DuplicateWithFlattenLayers:
|
||||
|
Loading…
Reference in New Issue
Block a user