Open bpostlethwaite opened 2 years ago
Looking into this more it seems like it should be working. Egui seems to append the ID to the parents ID during hashing, and the parents should be different. I'm not sure why we see ID collisions with multiple node graph instances
Hello, I encountered this problem, too. Actually I can have more than one node_graph in the egui app. The problem is when I want to show more than one at the same time. I'm using egui_tiles and until I drag one of them to have two visible at the same time it works. It would be nice to have that fixed. Thanks in advance.
NodeIds use slotmaps to hold references. Slotmaps return the same sequence of IDs for a given KeyType.
For example this runs with no panics
Egui Node Graph statically assigns the same KeyType to the node_graph slotmap and therefore multiple node_graphs in the same process will return the same keys. Since these keys go into the same "global" egui widget key-space egui complains about identical keys.