Skip to content

Commit

Permalink
Allow to get a PART_HEADER_FRAME bounds from Timeline for frames > la…
Browse files Browse the repository at this point in the history
…st frame

This was done just for testing, to see if FrameTags are outside the
valid range.
  • Loading branch information
dacap committed Mar 12, 2015
1 parent cdc9b41 commit 9947d80
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/app/ui/timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9947d80

Please sign in to comment.