mirror of
https://github.com/ppy/osu
synced 2024-12-18 12:55:37 +00:00
Merge pull request #10631 from bdach/shift-delete-all-selected
This commit is contained in:
commit
6cfaee0f0b
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user