Skip to content

Commit

Permalink
Remove unnecessary reverse in depth_order creation now that we proper…
Browse files Browse the repository at this point in the history
…ly compare instantiation order in the following sort
  • Loading branch information
mitchmindtree committed Dec 12, 2015
1 parent f16341f commit a1f38bf
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/graph/depth_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ fn visit_by_depth(graph: &Graph,
// node (perhaps in the `Container`).
let mut child_sorter: Vec<NodeIndex> = graph.depth_children(idx).iter(&graph).nodes().collect();

// Walking neighbors of a node in our graph returns then in the reverse order in which they
// were added. Reversing here will give more predictable render order behaviour i.e. widgets
// instantiated after other widgets will also be rendered after them by default.
child_sorter.reverse();
child_sorter.sort_by(|&a, &b| {
use std::cmp::Ordering;

Expand Down

0 comments on commit a1f38bf

Please sign in to comment.