Add extra empty frames if it's necessary on a copy-paste operation of layers between different sprites

This commit is contained in:
David Capello 2015-03-17 09:29:24 -03:00
parent 38e67dbbb6
commit d9c155a0cd

View File

@ -372,8 +372,8 @@ void clipboard::paste()
if (lastCel && maxFrame < lastCel->frame())
maxFrame = lastCel->frame();
}
if (dstSpr->totalFrames() < maxFrame+1)
api.setTotalFrames(dstSpr, maxFrame+1);
while (dstSpr->totalFrames() < maxFrame+1)
api.addEmptyFrame(dstSpr, dstSpr->totalFrames());
for (LayerIndex i = srcRange.layerBegin(); i <= srcRange.layerEnd(); ++i) {
LayerImage* newLayer = new LayerImage(dstSpr);