From 129b1bc6d3dfcebb51e4e30a7f40d34b6dea9807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Sat, 31 Oct 2020 11:35:25 +0100 Subject: [PATCH] Delete all selected objects if shift-clicked on one --- .../Edit/Compose/Components/SelectionHandler.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs index 01e23bafc5..92c75eae4f 100644 --- a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs +++ b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs @@ -226,13 +226,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)