Don't build inline symbols list, if not needed.

This commit is contained in:
Bartosz Taudul 2020-04-12 16:05:49 +02:00
parent 633902cce5
commit de18dd46b6

View File

@ -405,6 +405,12 @@ void SourceView::RenderSymbolView( const Worker& worker )
auto inlineList = worker.GetInlineSymbolList( m_baseAddr, m_codeLen ); auto inlineList = worker.GetInlineSymbolList( m_baseAddr, m_codeLen );
if( inlineList ) if( inlineList )
{
SmallCheckbox( ICON_FA_SITEMAP " Function:", &m_calcInlineStats );
ImGui::SameLine();
ImGui::SetNextItemWidth( -1 );
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
if( ImGui::BeginCombo( "##functionList", worker.GetString( sym->name ), ImGuiComboFlags_HeightLarge ) )
{ {
const auto symEnd = m_baseAddr + m_codeLen; const auto symEnd = m_baseAddr + m_codeLen;
Vector<uint64_t> symInline( m_baseAddr ); Vector<uint64_t> symInline( m_baseAddr );
@ -417,12 +423,6 @@ void SourceView::RenderSymbolView( const Worker& worker )
inlineList++; inlineList++;
} }
SmallCheckbox( ICON_FA_SITEMAP " Function:", &m_calcInlineStats );
ImGui::SameLine();
ImGui::SetNextItemWidth( -1 );
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
if( ImGui::BeginCombo( "##functionList", worker.GetString( sym->name ), ImGuiComboFlags_HeightLarge ) )
{
ImGui::Columns( 3 ); ImGui::Columns( 3 );
static bool widthSet = false; static bool widthSet = false;
if( !widthSet ) if( !widthSet )