Allow to get a PART_HEADER_FRAME bounds from Timeline for frames > last frame

This was done just for testing, to see if FrameTags are outside the
valid range.
This commit is contained in:
David Capello 2015-03-12 15:00:45 -03:00
parent cdc9b419c7
commit 9947d80b5e

View File

@ -1549,12 +1549,9 @@ gfx::Rect Timeline::getPartBounds(const Hit& hit) const
m_separator_x - FRMSIZE*5, HDRSIZE);
case PART_HEADER_FRAME:
if (validFrame(hit.frame)) {
return gfx::Rect(
bounds.x + m_separator_x + m_separator_w - 1 + FRMSIZE*hit.frame - m_scroll_x,
bounds.y + y, FRMSIZE, HDRSIZE);
}
break;
return gfx::Rect(
bounds.x + m_separator_x + m_separator_w - 1 + FRMSIZE*MAX(firstFrame(), hit.frame) - m_scroll_x,
bounds.y + y, FRMSIZE, HDRSIZE);
case PART_HEADER_FRAME_TAGS:
return gfx::Rect(