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,
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));
}