From d90fed8296f2dc0f7e7a568c791105bb1fced505 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 18 Oct 2022 21:44:08 +0200 Subject: [PATCH] Implement resetting selected microarchitecture. --- server/TracySourceView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 05558da4..056ee1bf 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -2374,11 +2374,13 @@ uint64_t SourceView::RenderSymbolAsmView( const AddrStatData& as, Worker& worker TextColoredUnformatted( ImVec4( 1.f, 0.3f, 0.3f, 1.f ), ICON_FA_MICROCHIP ); if( ImGui::IsItemHovered() ) { + const bool clicked = ImGui::IsItemClicked(); ImGui::BeginTooltip(); ImGui::TextUnformatted( "Selected microarchitecture does not match the one profiled application was running on" ); if( m_profileMicroArch >= 0 ) { ImGui::Text( "Measurements were performed on the %s microarchitecture", s_uArchUx[m_profileMicroArch].uArch ); + if( clicked ) SelectMicroArchitecture( s_uArchUx[m_profileMicroArch].moniker ); } else {