Only clip timeline item contents.

Timeline item header may overflow over other items, e.g. the crash marker is
taller than the header line.
This commit is contained in:
Bartosz Taudul 2022-09-03 23:09:23 +02:00
parent 840709fe46
commit 5cbf06ba31
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -53,6 +53,8 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
}
}
ImGui::PopClipRect();
float labelWidth;
const auto hdrOffset = oldOffset;
const bool drawHeader = yPos + ty >= yMin && yPos <= yMax;
@ -110,7 +112,6 @@ void TimelineItem::Draw( bool firstFrame, double pxns, int& offset, const ImVec2
offset += 0.2f * ostep;
AdjustThreadHeight( firstFrame, oldOffset, offset );
ImGui::PopClipRect();
ImGui::PopID();
}