mirror of
https://github.com/ppy/osu.git
synced 2025-03-19 01:17:19 +08:00
Simplify context menu check by using existing mergeable object list
This commit is contained in:
parent
ecb9351bab
commit
7cc9fdbaa0
@ -335,7 +335,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
/// All osu! hitobjects which can be moved/rotated/scaled.
|
||||
/// </summary>
|
||||
private OsuHitObject[] selectedMovableObjects => SelectedItems.OfType<OsuHitObject>()
|
||||
.Where(h => !(h is Spinner))
|
||||
.Where(h => h is not Spinner)
|
||||
.ToArray();
|
||||
|
||||
/// <summary>
|
||||
@ -434,7 +434,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
foreach (var item in base.GetContextMenuItemsForSelection(selection))
|
||||
yield return item;
|
||||
|
||||
if (selection.Count() > 1 && selection.All(o => o.Item is HitCircle or Slider))
|
||||
if (selectedMergeableObjects.Length > 1)
|
||||
yield return new OsuMenuItem("Merge selection", MenuItemType.Destructive, mergeSelection);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user