Skip to content

Commit

Permalink
Fix merging down linked layers (https://community.aseprite.org/t/2894)
Browse files Browse the repository at this point in the history
  • Loading branch information
dacap committed Apr 13, 2019
1 parent ebca165 commit 11c8ba3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/app/commands/cmd_merge_down_layer.cpp
Expand Up @@ -137,12 +137,14 @@ void MergeDownLayerCommand::onExecute(Context* context)
opacity,
src_layer->blendMode());

tx(new cmd::SetCelPosition(dst_cel,
bounds.x, bounds.y));

// First unlink the dst_cel
if (dst_cel->links())
tx(new cmd::UnlinkCel(dst_cel));

// Then modify the dst_cel
tx(new cmd::SetCelPosition(dst_cel,
bounds.x, bounds.y));

tx(new cmd::ReplaceImage(sprite,
dst_cel->imageRef(), new_image));
}
Expand Down

0 comments on commit 11c8ba3

Please sign in to comment.