1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

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)
{
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))
blueprint.ToggleSelection();
else
ensureSelected(blueprint);
}
private void handleQuickDeletion(SelectionBlueprint blueprint)
{
if (!blueprint.IsSelected)
EditorBeatmap.Remove(blueprint.HitObject);
else
deleteSelected();
}
private void ensureSelected(SelectionBlueprint blueprint)
{
if (blueprint.IsSelected)