This commit is contained in:
David Capello 2019-04-13 17:19:29 -03:00
parent ebca165b2a
commit 11c8ba3605

View File

@ -137,12 +137,14 @@ void MergeDownLayerCommand::onExecute(Context* context)
opacity, opacity,
src_layer->blendMode()); src_layer->blendMode());
tx(new cmd::SetCelPosition(dst_cel, // First unlink the dst_cel
bounds.x, bounds.y));
if (dst_cel->links()) if (dst_cel->links())
tx(new cmd::UnlinkCel(dst_cel)); 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, tx(new cmd::ReplaceImage(sprite,
dst_cel->imageRef(), new_image)); dst_cel->imageRef(), new_image));
} }