From 12f20803870d3e19f19fd0e96da180f5036908f9 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 17 Aug 2018 22:06:59 +0200 Subject: [PATCH] Right click on call stack file name to view source. --- server/TracyView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 8d0dcb4d..7d2e9610 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -5714,6 +5714,7 @@ void View::DrawCallstackWindow() { ImGui::BeginTooltip(); ImGui::Text( "Click on entry to copy it to clipboard." ); + ImGui::Text( "Right click on entry to try to open source file." ); ImGui::EndTooltip(); } ImGui::NextColumn(); @@ -5761,6 +5762,13 @@ void View::DrawCallstackWindow() { ImGui::SetClipboardText( txt ); } + if( ImGui::IsItemClicked( 1 ) ) + { + if( FileExists( txt ) ) + { + SetTextEditorFile( txt, frame->line ); + } + } ImGui::PopTextWrapPos(); ImGui::NextColumn(); }