Skip to content

Commit

Permalink
ProtocolAnalyzerDialog: avoid ID collision on expanded tree nodes. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
azonenberg committed Dec 24, 2024
1 parent 2838f59 commit a7d106f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ngscopeclient/ProtocolAnalyzerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit a7d106f

Please sign in to comment.