Fix timeline left cel edge bug (fix #1879)

This commit is contained in:
Gaspar Capello 2019-01-28 17:32:39 -03:00 committed by David Capello
parent d4607e889b
commit 20aa9992c7

View File

@ -1596,7 +1596,10 @@ void Timeline::onPaint(ui::PaintEvent& ev)
data.begin = layerImagePtr->getCelBegin();
data.end = layerImagePtr->getCelEnd();
data.it = layerImagePtr->findFirstCelIteratorAfter(firstFrame-1);
data.prevIt = data.end;
if (firstFrame > 0 && data.it != data.begin)
data.prevIt = data.it-1;
else
data.prevIt = data.end;
data.nextIt = (data.it != data.end ? data.it+1: data.end);
// Calculate link range for the active cel