From 8cc3cf3eb8ef85aaff1003a066298b168d9f7958 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 21 Aug 2015 15:32:32 -0300 Subject: [PATCH] Avoid assert() fail in configureAsBackground() call from NewSpriteFromSelectionCommand::onExecute() --- src/app/commands/cmd_new_sprite_from_selection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/commands/cmd_new_sprite_from_selection.cpp b/src/app/commands/cmd_new_sprite_from_selection.cpp index 5191d96e7..4f3ca31fd 100644 --- a/src/app/commands/cmd_new_sprite_from_selection.cpp +++ b/src/app/commands/cmd_new_sprite_from_selection.cpp @@ -73,9 +73,9 @@ void NewSpriteFromSelectionCommand::onExecute(Context* context) palette->copyColorsTo(dstSprite->palette(frame_t(0))); LayerImage* dstLayer = static_cast(dstSprite->folder()->getFirstLayer()); - dstLayer->setFlags(site.layer()->flags()); // Copy all flags if (site.layer()->isBackground()) dstLayer->configureAsBackground(); // Configure layer name as background + dstLayer->setFlags(site.layer()->flags()); // Copy all flags copy_image(dstLayer->cel(frame_t(0))->image(), image.get()); base::UniquePtr dstDoc(new Document(dstSprite));