1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 13:07:24 +08:00

Fix grid type cycling not taking into account the radio button selection

This commit is contained in:
OliBomby 2024-01-01 16:28:35 +01:00
parent b93bc21e45
commit ada20d230a

View File

@ -27,8 +27,6 @@ namespace osu.Game.Rulesets.Osu.Edit
{
private static readonly PositionSnapGridType[] grid_types = Enum.GetValues(typeof(PositionSnapGridType)).Cast<PositionSnapGridType>().ToArray();
private int currentGridTypeIndex;
[Resolved]
private EditorBeatmap editorBeatmap { get; set; } = null!;
@ -252,9 +250,9 @@ namespace osu.Game.Rulesets.Osu.Edit
private void nextGridType()
{
currentGridTypeIndex = (currentGridTypeIndex + 1) % grid_types.Length;
GridType.Value = grid_types[currentGridTypeIndex];
gridTypeButtons.Items[currentGridTypeIndex].Select();
int nextGridTypeIndex = (Array.IndexOf(grid_types, GridType.Value) + 1) % grid_types.Length;
GridType.Value = grid_types[nextGridTypeIndex];
gridTypeButtons.Items[nextGridTypeIndex].Select();
}
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)