Update Remove/RemoveRange/RemoveAll calls in line with framework changes

This commit is contained in:
Dean Herbert
2022-08-26 15:19:05 +09:00
parent 2b7b77157a
commit a215d009fe
39 changed files with 52 additions and 56 deletions

View File

@ -70,7 +70,7 @@ namespace osu.Game.Graphics.Containers
if (value == footer) return;
if (footer != null)
scrollContainer.Remove(footer);
scrollContainer.Remove(footer, true);
footer = value;
if (value == null) return;

View File

@ -59,7 +59,7 @@ namespace osu.Game.Graphics.Containers
drawable.StateChanged += state => selectionChanged(drawable, state);
}
public override bool Remove(T drawable)
public override bool Remove(T drawable, bool disposeImmediately)
=> throw new NotSupportedException($"Cannot remove drawables from {nameof(SelectionCycleFillFlowContainer<T>)}");
private void setSelected(int? value)

View File

@ -74,7 +74,7 @@ namespace osu.Game.Graphics.UserInterface
}
//I'm using ToList() here because Where() returns an Enumerable which can change it's elements afterwards
RemoveRange(Children.Where((_, index) => index >= value.Count()).ToList());
RemoveRange(Children.Where((_, index) => index >= value.Count()).ToList(), true);
}
}
}

View File

@ -64,8 +64,8 @@ namespace osu.Game.Graphics.UserInterface
X = value.HasFlagFast(Anchor.x2) ? SIZE_RETRACTED.X * shear.X * 0.5f : 0;
Remove(c1);
Remove(c2);
Remove(c1, false);
Remove(c2, false);
c1.Depth = value.HasFlagFast(Anchor.x2) ? 0 : 1;
c2.Depth = value.HasFlagFast(Anchor.x2) ? 1 : 0;
Add(c1);