conrod
conrod copied to clipboard
Is Graph::children broken?
I'm trying to recurse through the graphs children (while experimenting for #1187 )
To get a Widget's children I have that function:
fn get_children(graph: &Graph, id: widget::Id) -> Vec<widget::Id> {
graph
.children(id)
.iter(graph)
.map(|it| it.1)
.collect()
}
And two issues with it:
- There are many duplicates. For example the window has three times my "wrapper" widget as a child.
- Children contain their previous sibling....
Number one can be hacked around by calling Vec::dedup.
And this second issue is ridiculous.
If you @mitchmindtree know what is going on there please help :sob: Otherwise, I'll have to search for it or hack around it by skipping widgets that I've already visited.