From 29ac0169aa18b37b1d43fd06840e647cc9f1814f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 12 Jul 2020 15:13:03 +0200 Subject: [PATCH] Use clipper to display messages list. --- server/TracyView.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index b405dd13..23e93f2c 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -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= ImGui::GetScrollMaxY() )