mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-30 01:04:36 +00:00
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.
This commit is contained in:
parent
2ad3f9b51f
commit
fbc7a1e452
@ -635,6 +635,7 @@ static void DrawContents()
|
|||||||
ImGui::SetColumnWidth( 2, w * 0.425f );
|
ImGui::SetColumnWidth( 2, w * 0.425f );
|
||||||
}
|
}
|
||||||
std::lock_guard<std::mutex> lock( resolvLock );
|
std::lock_guard<std::mutex> lock( resolvLock );
|
||||||
|
int idx = 0;
|
||||||
for( auto& v : clients )
|
for( auto& v : clients )
|
||||||
{
|
{
|
||||||
const bool badProto = v.second.protocolVersion != tracy::ProtocolVersion;
|
const bool badProto = v.second.protocolVersion != tracy::ProtocolVersion;
|
||||||
@ -643,7 +644,9 @@ static void DrawContents()
|
|||||||
assert( name != resolvMap.end() );
|
assert( name != resolvMap.end() );
|
||||||
ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns;
|
ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns;
|
||||||
if( badProto ) flags |= ImGuiSelectableFlags_Disabled;
|
if( badProto ) flags |= ImGuiSelectableFlags_Disabled;
|
||||||
|
ImGui::PushID( idx++ );
|
||||||
const bool selected = ImGui::Selectable( name->second.c_str(), &sel, flags );
|
const bool selected = ImGui::Selectable( name->second.c_str(), &sel, flags );
|
||||||
|
ImGui::PopID();
|
||||||
if( ImGui::IsItemHovered() )
|
if( ImGui::IsItemHovered() )
|
||||||
{
|
{
|
||||||
char portstr[32];
|
char portstr[32];
|
||||||
|
Loading…
Reference in New Issue
Block a user