Skip to content
Permalink
Browse files

Fix merging down linked layers (https://community.aseprite.org/t/2894)

  • Loading branch information
dacap committed Apr 13, 2019
1 parent ebca165 commit 11c8ba3605515035520c322d4f6a773e3367d1af
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/app/commands/cmd_merge_down_layer.cpp
@@ -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));
}

0 comments on commit 11c8ba3

Please sign in to comment.
You can’t perform that action at this time.