Fix scroll bar display of child-only samples.

This commit is contained in:
Bartosz Taudul 2021-04-18 21:56:18 +02:00
parent c7da9b1092
commit 141a4bc0fe
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2133,20 +2133,16 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStat& iptotal, const unorder
++it; ++it;
} }
const auto ly = round( rect.Min.y + float( firstLine ) / m_asm.size() * rect.GetHeight() ); const auto ly = round( rect.Min.y + float( firstLine ) / m_asm.size() * rect.GetHeight() );
uint32_t color;
if( m_childCalls ) 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 ) 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 ) if( selJumpStart != 0 )