Skip to content

Commit

Permalink
Push/Pop node id
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Nelarius committed Feb 24, 2020
1 parent d6a5467 commit 459474e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imnodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand All @@ -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();
Expand Down

0 comments on commit 459474e

Please sign in to comment.