mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 19:13:29 +00:00
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:
parent
cdc9b419c7
commit
9947d80b5e
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user