From 141a4bc0fe507879e7a44ae016386be50850211f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 18 Apr 2021 21:56:18 +0200 Subject: [PATCH] Fix scroll bar display of child-only samples. --- server/TracySourceView.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index f4e8779e..0edc035b 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -2133,20 +2133,16 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStat& iptotal, const unorder ++it; } const auto ly = round( rect.Min.y + float( firstLine ) / m_asm.size() * rect.GetHeight() ); - uint32_t color; if( m_childCalls ) { - color = GetHotnessColor( ipSum.local + ipSum.ext, ipmax.local + ipmax.ext ); + const auto color = GetHotnessColor( ipSum.local + ipSum.ext, ipmax.local + ipmax.ext ); + draw->AddRectFilled( ImVec2( x40, ly ), ImVec2( x60, ly+3 ), color ); } else if( ipmax.local != 0 ) { - color = GetHotnessColor( ipSum.local, ipmax.local ); + const auto color = GetHotnessColor( ipSum.local, ipmax.local ); + draw->AddRectFilled( ImVec2( x40, ly ), ImVec2( x60, ly+3 ), color ); } - else - { - color = 0xFFFFFFFF; - } - draw->AddRectFilled( ImVec2( x40, ly ), ImVec2( x60, ly+3 ), color ); } if( selJumpStart != 0 )