conrod icon indicating copy to clipboard operation
conrod copied to clipboard

Is Graph::children broken?

Open luleyleo opened this issue 7 years ago • 0 comments

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:

  1. There are many duplicates. For example the window has three times my "wrapper" widget as a child.
  2. 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.

luleyleo avatar Jul 22 '18 13:07 luleyleo