From e376866436263943e0e12e64c89019d908706bb0 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 19 May 2020 19:06:01 +0200 Subject: [PATCH] Check for exclusive samples in inlined symbols list. --- server/TracyView.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 2e6d77e8..97642667 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -11900,16 +11900,20 @@ void View::DrawStatistics() break; } - ImGui::PushID( idx++ ); - if( iv.symAddr == v.symAddr ) + const auto sn = iv.symAddr == v.symAddr ? "[self time]" : name; + if( iv.excl == 0 ) { - TextDisabledUnformatted( "[self time]" ); + ImGui::TextUnformatted( sn ); } - else if( ImGui::Selectable( name, m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ) ) + else { - ShowSampleParents( iv.symAddr ); + ImGui::PushID( idx++ ); + if( ImGui::Selectable( sn, m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ) ) + { + ShowSampleParents( iv.symAddr ); + } + ImGui::PopID(); } - ImGui::PopID(); ImGui::NextColumn(); float indentVal = 0.f; if( m_statBuzzAnim.Match( iv.symAddr ) )