Refactor logic to avoid TimelineSelectionHandler having to block base calls

This commit is contained in:
Dean Herbert
2022-01-05 16:56:54 +09:00
parent 866ae3472b
commit 6779503e57
4 changed files with 11 additions and 8 deletions

View File

@ -54,14 +54,19 @@ namespace osu.Game.Rulesets.Catch.Edit
public override bool HandleFlip(Direction direction, bool flipOverOrigin)
{
if (SelectedItems.Count == 0 && !flipOverOrigin)
return false;
var selectionRange = CatchHitObjectUtils.GetPositionRange(SelectedItems);
bool changed = false;
EditorBeatmap.PerformOnSelection(h =>
{
if (h is CatchHitObject catchObject)
changed |= handleFlip(selectionRange, catchObject, flipOverOrigin);
});
return changed;
}