1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 03:27:24 +08:00

Ensure hotkey actions are executable in handler

This commit is contained in:
Bartłomiej Dach 2020-11-03 18:01:12 +01:00
parent d45520be5e
commit 18428dff8e

View File

@ -115,13 +115,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
switch (e.Key)
{
case Key.G:
return OnReverse?.Invoke() == true;
return CanReverse && OnReverse?.Invoke() == true;
case Key.H:
return OnFlip?.Invoke(Direction.Horizontal) == true;
return CanScaleX && OnFlip?.Invoke(Direction.Horizontal) == true;
case Key.J:
return OnFlip?.Invoke(Direction.Vertical) == true;
return CanScaleY && OnFlip?.Invoke(Direction.Vertical) == true;
}
return base.OnKeyDown(e);