From a7d106fc17ebb7e8edd9e6a760b05702ef913e0a Mon Sep 17 00:00:00 2001 From: "Andrew D. Zonenberg" Date: Tue, 24 Dec 2024 06:09:46 -0800 Subject: [PATCH] ProtocolAnalyzerDialog: avoid ID collision on expanded tree nodes. Fixes #812. --- src/ngscopeclient/ProtocolAnalyzerDialog.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ngscopeclient/ProtocolAnalyzerDialog.cpp b/src/ngscopeclient/ProtocolAnalyzerDialog.cpp index 291fc3e4..855358a5 100644 --- a/src/ngscopeclient/ProtocolAnalyzerDialog.cpp +++ b/src/ngscopeclient/ProtocolAnalyzerDialog.cpp @@ -306,8 +306,14 @@ bool ProtocolAnalyzerDialog::DoRender() bool rowIsSelected = pack && (m_selectedPacket == pack); TimePoint packtime(row.m_stamp.GetSec(), row.m_stamp.GetFs() + offset); + string selid; + if(hasChildren) + selid = packtime.PrettyPrint() + "###" + packtime.PrettyPrint() + "_parent"; + else + selid = packtime.PrettyPrint(); + if(ImGui::Selectable( - packtime.PrettyPrint().c_str(), + selid.c_str(), rowIsSelected, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap, ImVec2(0, 0)))