1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-30 12:53:51 +00:00

Use clipper to display messages list.

This commit is contained in:
Bartosz Taudul 2020-07-12 15:13:03 +02:00
parent 333e10c724
commit 29ac0169aa

View File

@ -8661,10 +8661,24 @@ void View::DrawMessages()
ImGui::Separator();
int idx = 0;
if( m_msgToFocus )
{
for( const auto& msgIdx : msgList )
{
DrawMessageLine( *msgs[msgIdx], hasCallstack, idx );
}
}
else
{
ImGuiListClipper clipper( msgList.size() );
while( clipper.Step() )
{
for( auto i=clipper.DisplayStart; i<clipper.DisplayEnd; i++ )
{
DrawMessageLine( *msgs[i], hasCallstack, idx );
}
}
}
if( m_worker.IsConnected() && ImGui::GetScrollY() >= ImGui::GetScrollMaxY() )
{