Merge pull request #10631 from bdach/shift-delete-all-selected

This commit is contained in:
Dean Herbert 2020-11-02 12:04:58 +09:00 committed by GitHub
commit 6cfaee0f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -222,13 +222,21 @@ namespace osu.Game.Screens.Edit.Compose.Components
internal void HandleSelectionRequested(SelectionBlueprint blueprint, InputState state) internal void HandleSelectionRequested(SelectionBlueprint blueprint, InputState state)
{ {
if (state.Keyboard.ShiftPressed && state.Mouse.IsPressed(MouseButton.Right)) if (state.Keyboard.ShiftPressed && state.Mouse.IsPressed(MouseButton.Right))
EditorBeatmap.Remove(blueprint.HitObject); handleQuickDeletion(blueprint);
else if (state.Keyboard.ControlPressed && state.Mouse.IsPressed(MouseButton.Left)) else if (state.Keyboard.ControlPressed && state.Mouse.IsPressed(MouseButton.Left))
blueprint.ToggleSelection(); blueprint.ToggleSelection();
else else
ensureSelected(blueprint); ensureSelected(blueprint);
} }
private void handleQuickDeletion(SelectionBlueprint blueprint)
{
if (!blueprint.IsSelected)
EditorBeatmap.Remove(blueprint.HitObject);
else
deleteSelected();
}
private void ensureSelected(SelectionBlueprint blueprint) private void ensureSelected(SelectionBlueprint blueprint)
{ {
if (blueprint.IsSelected) if (blueprint.IsSelected)