Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Graph::children broken? #1191

Open
luleyleo opened this issue Jul 22, 2018 · 0 comments
Open

Is Graph::children broken? #1191

luleyleo opened this issue Jul 22, 2018 · 0 comments
Labels

Comments

@luleyleo
Copy link

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 😭
Otherwise, I'll have to search for it or hack around it by skipping widgets that I've already visited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants