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

Fix autosize invalidations occurring with BypassAutoSIzeAxes #1554

merged 2 commits into from May 18, 2018


Copy link

@smoogipoo smoogipoo commented May 16, 2018

In the case of, e.g.:

container1 = Container
    AutoSizeAxes = Axes.Both
    Children =
        {{ other children }}
        container2 = Container
            AutoSizeAxes = Axes.Both // Want to maintain a size
            BypassAutoSizeAxes = Axes.Both // But we don't want the parent to size to us

If the size of container2 was changed, it will propagate a DrawSize invalidation to container1 which will cause container1 to recompute its autosize.
When container1 recomputes its autosize, it finds that container2 has BypassAutoSizeAxes, so skips it.

This extra computation is unnecessary.

@@ -254,7 +254,7 @@ protected internal virtual bool RemoveInternal(Drawable drawable)
drawable.IsAlive = false;

if (AutoSizeAxes != Axes.None)

This comment was marked as off-topic.

This comment was marked as off-topic.

@Tom94 Tom94 merged commit 90c4252 into ppy:master May 18, 2018
@smoogipoo smoogipoo deleted the bypass-autosize-optimisation branch November 26, 2018 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants