1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Ensure scale x or y does not go below zero in SkinSelectionHandler.HandleScale

This commit is contained in:
Robin Avery 2021-06-08 11:49:25 -04:00
parent 04cc788627
commit 2484ccd50c
No known key found for this signature in database
GPG Key ID: 0496DF10CEF7E226

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)