Skip to content

Commit

Permalink
Fixed imgui id collisions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Borry committed Oct 12, 2024
1 parent 417ea91 commit 2949b65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ngscopeclient/StreamBrowserDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ bool StreamBrowserDialog::DoRender()
auto insts = m_session.GetInstruments();
for(auto inst : insts)
{
ImGui::PushID(inst.get());
bool instIsOpen = ImGui::TreeNodeEx(inst->m_nickname.c_str(), ImGuiTreeNodeFlags_DefaultOpen);
startBadgeLine();

Expand Down Expand Up @@ -430,6 +431,7 @@ bool StreamBrowserDialog::DoRender()

for(size_t i=0; i<channelCount; i++)
{
ImGui::PushID(i);
auto chan = inst->GetChannel(i);

bool singleStream = chan->GetStreamCount() == 1;
Expand Down Expand Up @@ -619,10 +621,13 @@ bool StreamBrowserDialog::DoRender()

if(open)
ImGui::TreePop();

ImGui::PopID();
}

ImGui::TreePop();
}
ImGui::PopID();
}

//Add all filters
Expand Down

0 comments on commit 2949b65

Please sign in to comment.