From 655bcd40fb763e6524028c2bb82234c473f22fff Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 15 Aug 2022 20:39:35 +0200 Subject: [PATCH] Limit sample statistics frame name tooltip to frame name. --- server/TracyView_Samples.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/TracyView_Samples.cpp b/server/TracyView_Samples.cpp index 058f4eaf..a920ecc0 100644 --- a/server/TracyView_Samples.cpp +++ b/server/TracyView_Samples.cpp @@ -325,7 +325,9 @@ void View::DrawSamplesStatistics( Vector& data, int64_t timeRange, Accu else { const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, name ); - clicked = ImGui::Selectable( normalized, m_sampleParents.withInlines && m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ); + clicked = ImGui::Selectable( "", m_sampleParents.withInlines && m_sampleParents.symAddr == v.symAddr, ImGuiSelectableFlags_SpanAllColumns ); + ImGui::SameLine( 0, 0 ); + ImGui::TextUnformatted( normalized ); TooltipNormalizedName( name, normalized ); } if( clicked ) ShowSampleParents( v.symAddr, !m_statSeparateInlines ); @@ -533,7 +535,9 @@ void View::DrawSamplesStatistics( Vector& data, int64_t timeRange, Accu else { const auto normalized = ShortenZoneName( ShortenName::OnlyNormalize, sn ); - clicked = ImGui::Selectable( normalized, !m_sampleParents.withInlines && m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ); + clicked = ImGui::Selectable( "", !m_sampleParents.withInlines && m_sampleParents.symAddr == iv.symAddr, ImGuiSelectableFlags_SpanAllColumns ); + ImGui::SameLine( 0, 0 ); + ImGui::TextUnformatted( normalized ); TooltipNormalizedName( sn, normalized ); } if( clicked ) ShowSampleParents( iv.symAddr, false );