From 1439c0f39289d7d5a3d8848a2fb2f2bd86d78783 Mon Sep 17 00:00:00 2001 From: kamp Date: Thu, 12 Nov 2020 23:19:29 +0100 Subject: [PATCH] Prevent SelectionBox handles from appearing when a stack of circles is selected --- osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs b/osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs index a72dcff1e9..fd7ea050b9 100644 --- a/osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs +++ b/osu.Game.Rulesets.Osu/Edit/OsuSelectionHandler.cs @@ -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()