flamendless / Slab

An immediate mode GUI for the Love2D framework.
MIT License
289 stars 25 forks source link

Clicking a tree node affects unrelated tree nodes #112

Open megagrump opened 2 years ago

megagrump commented 2 years ago

In the Slab demo: Click Debug/DrawCommands, then expand all top level categories in the window:

image

Click on one of the nodes named Channels:

image

Note how all Channels child nodes are now expanded, not just the one that was clicked. Clicking any of them afterwards will collapse all of them.

flamendless commented 2 years ago

Hmm i think this is due to them having the same id "Channels" though i expected that a child node should have a different internal key from push/pop tree id 🤔 i thought slab already does tree id handling

flamendless commented 2 years ago

I think a push/pop id internal to Tree would be ideal to avoid conflicting IDs if nested. I'll wait for you to finish the changes in Tree module before I implement it