From 925732914ab72cbdecf3daa22225a8536e338391 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 31 Jan 2026 19:17:12 +0100 Subject: [PATCH] Draw source code preview in source file link tooltip. --- profiler/src/profiler/TracyMarkdown.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyMarkdown.cpp b/profiler/src/profiler/TracyMarkdown.cpp index e0b0ee0f..f295c09b 100644 --- a/profiler/src/profiler/TracyMarkdown.cpp +++ b/profiler/src/profiler/TracyMarkdown.cpp @@ -309,7 +309,14 @@ public: ImGui::Text( ":%i", line ); } - if( !idx.Active() ) + if( idx.Active() ) + { + ImGui::Dummy( ImVec2( 0, ImGui::GetTextLineHeight() * 0.25f ) ); + ImGui::Separator(); + ImGui::Dummy( ImVec2( 0, ImGui::GetTextLineHeight() * 0.25f ) ); + m_view->DrawSourceTooltip( fn.c_str(), line, 3, 3, false ); + } + else { TextColoredUnformatted( ImVec4( 1.f, 0.f, 0.f, 1.f ), "Invalid source file reference" ); }