mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 18:32:56 +08:00
Move helper method to bottom of class
This commit is contained in:
parent
d50e9caa11
commit
2e5770be4e
@ -354,9 +354,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
.OrderBy(h => h.StartTime)
|
||||
.ToArray();
|
||||
|
||||
private bool canMerge(IReadOnlyList<OsuHitObject> objects) =>
|
||||
objects.Count > 1 && (objects.Any(h => h is Slider) || Precision.DefinitelyBigger(Vector2.DistanceSquared(objects[0].Position, objects[1].Position), 1));
|
||||
|
||||
private void mergeSelection()
|
||||
{
|
||||
var mergeableObjects = selectedMergeableObjects;
|
||||
@ -451,5 +448,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
if (canMerge(selectedMergeableObjects))
|
||||
yield return new OsuMenuItem("Merge selection", MenuItemType.Destructive, mergeSelection);
|
||||
}
|
||||
|
||||
private bool canMerge(IReadOnlyList<OsuHitObject> objects) =>
|
||||
objects.Count > 1
|
||||
&& (objects.Any(h => h is Slider)
|
||||
|| Precision.DefinitelyBigger(Vector2.DistanceSquared(objects[0].Position, objects[1].Position), 1));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user