mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 03:22:55 +08:00
Don't allow two momentary toggles at the same time to avoid edge cases
This commit is contained in:
parent
16f5c2a7c6
commit
ca91f9f716
@ -261,7 +261,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
if (key.ShiftPressed)
|
if (key.ShiftPressed)
|
||||||
{
|
{
|
||||||
if (gridSnapBeforeMomentary == null)
|
if (distanceSnapBeforeMomentary == null && gridSnapBeforeMomentary == null)
|
||||||
{
|
{
|
||||||
gridSnapBeforeMomentary = rectangularGridSnapToggle.Value;
|
gridSnapBeforeMomentary = rectangularGridSnapToggle.Value;
|
||||||
rectangularGridSnapToggle.Value = rectangularGridSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;
|
rectangularGridSnapToggle.Value = rectangularGridSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;
|
||||||
@ -278,7 +278,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
if (key.AltPressed)
|
if (key.AltPressed)
|
||||||
{
|
{
|
||||||
if (distanceSnapBeforeMomentary == null)
|
if (gridSnapBeforeMomentary == null && distanceSnapBeforeMomentary == null)
|
||||||
{
|
{
|
||||||
distanceSnapBeforeMomentary = distanceSnapToggle.Value;
|
distanceSnapBeforeMomentary = distanceSnapToggle.Value;
|
||||||
distanceSnapToggle.Value = distanceSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;
|
distanceSnapToggle.Value = distanceSnapToggle.Value == TernaryState.False ? TernaryState.True : TernaryState.False;
|
||||||
|
Loading…
Reference in New Issue
Block a user