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

Don't show the flip button when flipping is a no-op

This commit is contained in:
ekrctb 2021-07-22 13:06:48 +09:00
parent 73866c2837
commit 7b6981c632
2 changed files with 4 additions and 1 deletions

View File

@ -69,7 +69,8 @@ namespace osu.Game.Rulesets.Catch.Edit
{
base.OnSelectionChanged();
SelectionBox.CanFlipX = true;
var selectionRange = CatchHitObjectUtils.GetPositionRange(EditorBeatmap.SelectedHitObjects);
SelectionBox.CanFlipX = selectionRange.Length > 0 && EditorBeatmap.SelectedHitObjects.Any(h => h is CatchHitObject && !(h is BananaShower));
}
/// <summary>

View File

@ -15,6 +15,8 @@ namespace osu.Game.Rulesets.Catch.Edit
public readonly float Min;
public readonly float Max;
public float Length => Max - Min;
public PositionRange(float value)
: this(value, value)
{