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:
parent
333e10c724
commit
29ac0169aa
@ -8661,10 +8661,24 @@ void View::DrawMessages()
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
if( m_msgToFocus )
|
||||||
|
{
|
||||||
for( const auto& msgIdx : msgList )
|
for( const auto& msgIdx : msgList )
|
||||||
{
|
{
|
||||||
DrawMessageLine( *msgs[msgIdx], hasCallstack, idx );
|
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() )
|
if( m_worker.IsConnected() && ImGui::GetScrollY() >= ImGui::GetScrollMaxY() )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user