Fix off-by-one-frame in timeline item height.

This commit is contained in:
Tomaž Vöröš
2023-01-27 20:00:05 +01:00
parent 7b9b810421
commit 2df56e9941
2 changed files with 4 additions and 2 deletions

View File

@@ -30,8 +30,10 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, float
for( auto& item : m_items )
{
auto currentFrameItemHeight = item->GetNextFrameHeight();
item->Draw( m_firstFrame, pxns, yOffset, wpos, hover, yMin, yMax );
yOffset += item->GetNextFrameHeight();
if( m_firstFrame ) currentFrameItemHeight = item->GetNextFrameHeight();
yOffset += currentFrameItemHeight;
}
const auto scrollPos = ImGui::GetScrollY();