1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +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,9 +8661,23 @@ void View::DrawMessages()
ImGui::Separator();
int idx = 0;
for( const auto& msgIdx : msgList )
if( m_msgToFocus )
{
DrawMessageLine( *msgs[msgIdx], hasCallstack, idx );
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() )