Fix bug copying/moving cels with z-index (fix #4779)

This commit is contained in:
David Capello 2024-11-12 22:05:06 -03:00
parent 21e8e01951
commit 1ec76afeaf

View File

@ -90,6 +90,13 @@ DocApi::HandleLinkedCels::HandleLinkedCels(
new cmd::CopyCel(
dstRelated->layer(), dstRelated->frame(),
dstLayer, dstFrame, true));
// Copy data that belongs to the original Cel itself (no the
// shared CelData) like the z-index.
if (Cel* dstCel = dstLayer->cel(dstFrame)) {
dstCel->setZIndex(srcCel->zIndex());
}
m_created = true;
return;
}