Centralise cases of performing actions on the current selection

By moving this to a central location, we can avoid invoking the
EditorChangeHandler when there is no selection made. This helps
alleviate the issue pointed out in
https://github.com/ppy/osu/issues/11901, but not fix it completely.
This commit is contained in:
Dean Herbert
2021-02-26 14:15:12 +09:00
parent 119b4e8174
commit cd1c1bf534
5 changed files with 42 additions and 44 deletions

View File

@ -495,8 +495,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
// Apply the start time at the newly snapped-to position
double offset = result.Time.Value - movementBlueprints.First().HitObject.StartTime;
foreach (HitObject obj in Beatmap.SelectedHitObjects)
obj.StartTime += offset;
Beatmap.PerformOnSelection(obj => obj.StartTime += offset);
}
return true;