Merge pull request #13382 from ribbanya/clamp-skin-scale

Fix skin elements flipping when scaled below zero
This commit is contained in:
Dean Herbert 2021-07-02 20:50:47 +09:00 committed by GitHub
commit 6e31c781bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,8 +95,8 @@ namespace osu.Game.Skinning.Editor
// scale adjust applied to each individual item should match that of the quad itself.
var scaledDelta = new Vector2(
adjustedRect.Width / selectionRect.Width,
adjustedRect.Height / selectionRect.Height
MathF.Max(adjustedRect.Width / selectionRect.Width, 0),
MathF.Max(adjustedRect.Height / selectionRect.Height, 0)
);
foreach (var b in SelectedBlueprints)