mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 04:53:12 +08:00
Remove unnecessary null pre-checks
This commit is contained in:
parent
e636fcd9b8
commit
ecb9351bab
@ -348,10 +348,10 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
private void mergeSelection()
|
private void mergeSelection()
|
||||||
{
|
{
|
||||||
if (EditorBeatmap == null || ChangeHandler == null || selectedMergeableObjects.Length < 2)
|
if (selectedMergeableObjects.Length < 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ChangeHandler.BeginChange();
|
ChangeHandler?.BeginChange();
|
||||||
|
|
||||||
// Have an initial slider object.
|
// Have an initial slider object.
|
||||||
var firstHitObject = selectedMergeableObjects[0];
|
var firstHitObject = selectedMergeableObjects[0];
|
||||||
@ -426,7 +426,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
SelectedItems.Clear();
|
SelectedItems.Clear();
|
||||||
SelectedItems.Add(mergedHitObject);
|
SelectedItems.Add(mergedHitObject);
|
||||||
|
|
||||||
ChangeHandler.EndChange();
|
ChangeHandler?.EndChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IEnumerable<MenuItem> GetContextMenuItemsForSelection(IEnumerable<SelectionBlueprint<HitObject>> selection)
|
protected override IEnumerable<MenuItem> GetContextMenuItemsForSelection(IEnumerable<SelectionBlueprint<HitObject>> selection)
|
||||||
|
Loading…
Reference in New Issue
Block a user