mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 16:27:43 +08:00
Fix scale popover doing things when both scale axes are turned off
Spotted in passing when reviewing https://github.com/ppy/osu/pull/30080. The popover would very arbitrarily revert to scaling by Y axis if both checkboxes were checked off. Not sure how this passed review.
This commit is contained in:
parent
616c2aeefc
commit
4e8e4a34bd
@ -219,7 +219,18 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Axes getAdjustAxis(PreciseScaleInfo scale) => scale.XAxis ? scale.YAxis ? Axes.Both : Axes.X : Axes.Y;
|
private Axes getAdjustAxis(PreciseScaleInfo scale)
|
||||||
|
{
|
||||||
|
var result = Axes.None;
|
||||||
|
|
||||||
|
if (scale.XAxis)
|
||||||
|
result |= Axes.X;
|
||||||
|
|
||||||
|
if (scale.YAxis)
|
||||||
|
result |= Axes.Y;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
private float getRotation(PreciseScaleInfo scale) => scale.Origin == ScaleOrigin.GridCentre ? gridToolbox.GridLinesRotation.Value : 0;
|
private float getRotation(PreciseScaleInfo scale) => scale.Origin == ScaleOrigin.GridCentre ? gridToolbox.GridLinesRotation.Value : 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user