mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-04 05:50:15 +00:00
Fix timeline glitch playing linked frames (fix #1705)
This commit is contained in:
parent
a7c7e82aa8
commit
fd53e373b6
@ -444,6 +444,17 @@ void Timeline::setFrame(frame_t frame, bool byUser)
|
|||||||
else if (frame >= m_sprite->totalFrames())
|
else if (frame >= m_sprite->totalFrames())
|
||||||
frame = frame_t(m_sprite->totalFrames()-1);
|
frame = frame_t(m_sprite->totalFrames()-1);
|
||||||
|
|
||||||
|
if (m_layer) {
|
||||||
|
Cel* oldCel = m_layer->cel(m_frame);
|
||||||
|
Cel* newCel = m_layer->cel(frame);
|
||||||
|
std::size_t oldLinks = oldCel ? oldCel->links(): 0;
|
||||||
|
std::size_t newLinks = newCel ? newCel->links(): 0;
|
||||||
|
if ((oldLinks && !newCel) ||
|
||||||
|
( newLinks && !oldCel) ||
|
||||||
|
((oldLinks>0 || newLinks>0) && (oldCel->data() != newCel->data())))
|
||||||
|
invalidateLayer(m_layer);
|
||||||
|
}
|
||||||
|
|
||||||
invalidateFrame(m_frame);
|
invalidateFrame(m_frame);
|
||||||
invalidateFrame(frame);
|
invalidateFrame(frame);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user