From fbc7a1e452ab9d525462c673b1c09cb5ef1182b9 Mon Sep 17 00:00:00 2001 From: Carsten Juttner Date: Sun, 5 Apr 2020 12:51:40 +0200 Subject: [PATCH] Since the name is just the IP address it is not unique in case the difference is only in the port number. So make it unique for selection to work not just for the first element in this case. --- profiler/src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index f7c59e22..9544a20c 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -635,6 +635,7 @@ static void DrawContents() ImGui::SetColumnWidth( 2, w * 0.425f ); } std::lock_guard lock( resolvLock ); + int idx = 0; for( auto& v : clients ) { const bool badProto = v.second.protocolVersion != tracy::ProtocolVersion; @@ -643,7 +644,9 @@ static void DrawContents() assert( name != resolvMap.end() ); ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns; if( badProto ) flags |= ImGuiSelectableFlags_Disabled; + ImGui::PushID( idx++ ); const bool selected = ImGui::Selectable( name->second.c_str(), &sel, flags ); + ImGui::PopID(); if( ImGui::IsItemHovered() ) { char portstr[32];