From 459474e4efbd186630095573bc9a7b80651121d9 Mon Sep 17 00:00:00 2001 From: Johann Muszynski Date: Mon, 24 Feb 2020 08:28:57 +0200 Subject: [PATCH] Push/Pop node id It wasn't possible to remove the push/pop node id in Begin/EndNode after all. Doing so makes non-attribute UI elements indistinguishable from each other. --- imnodes.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imnodes.cpp b/imnodes.cpp index f2faae6..ee56805 100755 --- a/imnodes.cpp +++ b/imnodes.cpp @@ -1617,6 +1617,7 @@ void BeginNode(const int node_id) g.canvas_draw_list->ChannelsSplit(Channels_Count); g.canvas_draw_list->ChannelsSetCurrent(Channels_ImGui); + ImGui::PushID(node.id); ImGui::BeginGroup(); } @@ -1629,6 +1630,7 @@ void EndNode() // The node's rectangle depends on the ImGui UI group size. ImGui::EndGroup(); + ImGui::PopID(); { NodeData& node = editor.nodes.pool[g.node_current.index]; node.rect = get_item_rect();