Fix TimelineController height calculation.

This commit is contained in:
Tomaž Vöröš
2022-12-18 20:45:05 +01:00
parent d6772900ad
commit e4ab6cdaf1
3 changed files with 2 additions and 12 deletions

View File

@@ -7,7 +7,6 @@ namespace tracy
TimelineController::TimelineController( View& view, Worker& worker )
: m_height( 0 )
, m_scroll( 0 )
, m_firstFrame( true )
, m_view( view )
, m_worker( worker )
@@ -31,16 +30,7 @@ void TimelineController::End( double pxns, int offset, const ImVec2& wpos, bool
item->Draw( m_firstFrame, pxns, offset, wpos, hover, yMin, yMax );
}
const auto scrollPos = ImGui::GetScrollY();
if( scrollPos == 0 && m_scroll != 0 )
{
m_height = 0;
}
else
{
if( offset > m_height ) m_height = offset;
}
m_scroll = scrollPos;
m_height = offset;
}
}