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

Merge pull request #10810 from nbvdkamp/fix-editor-circle-stack-scale-crash

Prevent SelectionBox handles from appearing for stacks
This commit is contained in:
Bartłomiej Dach 2020-11-13 00:29:17 +01:00 committed by GitHub
commit 967aeddf8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,12 +21,12 @@ namespace osu.Game.Rulesets.Osu.Edit
{
base.OnSelectionChanged();
bool canOperate = EditorBeatmap.SelectedHitObjects.Count > 1 || EditorBeatmap.SelectedHitObjects.Any(s => s is Slider);
Quad quad = selectedMovableObjects.Length > 0 ? getSurroundingQuad(selectedMovableObjects) : new Quad();
SelectionBox.CanRotate = canOperate;
SelectionBox.CanScaleX = canOperate;
SelectionBox.CanScaleY = canOperate;
SelectionBox.CanReverse = canOperate;
SelectionBox.CanRotate = quad.Width > 0 || quad.Height > 0;
SelectionBox.CanScaleX = quad.Width > 0;
SelectionBox.CanScaleY = quad.Height > 0;
SelectionBox.CanReverse = EditorBeatmap.SelectedHitObjects.Count > 1 || EditorBeatmap.SelectedHitObjects.Any(s => s is Slider);
}
protected override void OnOperationEnded()