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

Remove depth comparisons from FlowContainer ordering #1446

Merged
merged 1 commit into from Mar 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 2 additions & 10 deletions osu.Framework/Graphics/Containers/FlowContainer.cs
Expand Up @@ -18,14 +18,6 @@ public abstract class FlowContainer<T> : Container<T>
{
internal event Action OnLayout;

private readonly ChildComparer childComparer;

protected FlowContainer()
{
childComparer = new ChildComparer(this);
}


/// <summary>
/// The easing that should be used when children are moved to their position in the layout.
/// </summary>
Expand Down Expand Up @@ -159,9 +151,9 @@ public override void InvalidateFromChild(Invalidation invalidation)
}

/// <summary>
/// Gets the children that appear in the flow of this FlowContainer in the order in which they are processed within the flowing layout.
/// Gets the children that appear in the flow of this <see cref="FlowContainer{T}"/> in the order in which they are processed within the flowing layout.
/// </summary>
public virtual IEnumerable<Drawable> FlowingChildren => AliveInternalChildren.Where(d => d.IsPresent).OrderBy(d => layoutChildren[d]).ThenBy(d => d, childComparer);
public virtual IEnumerable<Drawable> FlowingChildren => AliveInternalChildren.Where(d => d.IsPresent).OrderBy(d => layoutChildren[d]).ThenBy(d => d.ChildID);

protected abstract IEnumerable<Vector2> ComputeLayoutPositions();

Expand Down