mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 15:52:54 +08:00
Fix single sliders not being flippable due to incorrect precondition
This commit is contained in:
parent
6779503e57
commit
ee24713002
@ -89,17 +89,24 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
{
|
||||
var hitObjects = selectedMovableObjects;
|
||||
|
||||
if (hitObjects.Length == 1 && !flipOverOrigin)
|
||||
return false;
|
||||
|
||||
var flipQuad = flipOverOrigin ? new Quad(0, 0, OsuPlayfield.BASE_SIZE.X, OsuPlayfield.BASE_SIZE.Y) : getSurroundingQuad(hitObjects);
|
||||
|
||||
bool didFlip = false;
|
||||
|
||||
foreach (var h in hitObjects)
|
||||
{
|
||||
h.Position = GetFlippedPosition(direction, flipQuad, h.Position);
|
||||
var flippedPosition = GetFlippedPosition(direction, flipQuad, h.Position);
|
||||
|
||||
if (!Precision.AlmostEquals(flippedPosition, h.Position))
|
||||
{
|
||||
h.Position = flippedPosition;
|
||||
didFlip = true;
|
||||
}
|
||||
|
||||
if (h is Slider slider)
|
||||
{
|
||||
didFlip = true;
|
||||
|
||||
foreach (var point in slider.Path.ControlPoints)
|
||||
{
|
||||
point.Position = new Vector2(
|
||||
@ -110,7 +117,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return didFlip;
|
||||
}
|
||||
|
||||
public override bool HandleScale(Vector2 scale, Anchor reference)
|
||||
|
Loading…
Reference in New Issue
Block a user