1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 06:12:56 +08:00

Don't use in invalidation logic to avoid incorrect execution

This commit is contained in:
Dean Herbert 2018-07-16 16:39:52 +09:00
parent 98cddc0c04
commit 58fe434dd0
4 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if (invalidation.HasFlag(Invalidation.DrawSize))
if ((invalidation & Invalidation.DrawSize) > 0)
subtractionCache.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);

View File

@ -84,7 +84,7 @@ namespace osu.Game.Graphics
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if (invalidation.HasFlag(Invalidation.Colour) && Shadow)
if ((invalidation & Invalidation.Colour) > 0 && Shadow)
layout.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}

View File

@ -75,7 +75,7 @@ namespace osu.Game.Graphics.UserInterface
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if (invalidation.HasFlag(Invalidation.DrawSize))
if ((invalidation & Invalidation.DrawSize) > 0)
pathCached.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);

View File

@ -71,7 +71,7 @@ namespace osu.Game.Screens.Play
public override bool Invalidate(Invalidation invalidation = Invalidation.All, Drawable source = null, bool shallPropagate = true)
{
if (invalidation.HasFlag(Invalidation.DrawSize))
if ((invalidation & Invalidation.DrawSize) > 0)
layout.Invalidate();
return base.Invalidate(invalidation, source, shallPropagate);
}