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

Don't allow two momentary toggles at the same time to avoid edge cases

This commit is contained in:
Dean Herbert 2022-10-21 17:16:55 +09:00
parent 16f5c2a7c6
commit ca91f9f716

View File

@ -261,7 +261,7 @@ namespace osu.Game.Rulesets.Osu.Edit
{
if (key.ShiftPressed)
{
if (gridSnapBeforeMomentary == null)
if (distanceSnapBeforeMomentary == null && gridSnapBeforeMomentary == null)
{
gridSnapBeforeMomentary = rectangularGridSnapToggle.Value;
rectangularGridSnapToggle.Value = rectangularGridSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;
@ -278,7 +278,7 @@ namespace osu.Game.Rulesets.Osu.Edit
if (key.AltPressed)
{
if (distanceSnapBeforeMomentary == null)
if (gridSnapBeforeMomentary == null && distanceSnapBeforeMomentary == null)
{
distanceSnapBeforeMomentary = distanceSnapToggle.Value;
distanceSnapToggle.Value = distanceSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;