mirror of https://github.com/ppy/osu
Don't show the flip button when flipping is a no-op
This commit is contained in:
parent
73866c2837
commit
7b6981c632
|
@ -69,7 +69,8 @@ protected override void OnSelectionChanged()
|
|||
{
|
||||
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>
|
||||
|
|
|
@ -15,6 +15,8 @@ public readonly struct PositionRange
|
|||
public readonly float Min;
|
||||
public readonly float Max;
|
||||
|
||||
public float Length => Max - Min;
|
||||
|
||||
public PositionRange(float value)
|
||||
: this(value, value)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue