From b65824d116edb2eafd2d65b1d268ac8bfba9dfc6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 24 Mar 2018 15:20:39 +0100 Subject: [PATCH] Show source location details when one is selected. --- server/TracyView.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 1a8a16ed..b67262f3 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3500,8 +3500,13 @@ void View::DrawStatistics() ImGui::PushID( v->first ); auto& srcloc = m_worker.GetSourceLocation( v->first ); - if( ImGui::Selectable( m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ), false, ImGuiSelectableFlags_SpanAllColumns ) ) + auto name = m_worker.GetString( srcloc.name.active ? srcloc.name : srcloc.function ); + if( ImGui::Selectable( name, false, ImGuiSelectableFlags_SpanAllColumns ) ) { + m_findZone.show = true; + m_findZone.Reset(); + m_findZone.match.emplace_back( v->first ); + strcpy( m_findZone.pattern, name ); } ImGui::NextColumn(); ImGui::Text( "%s:%i", m_worker.GetString( srcloc.file ), srcloc.line );