mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 03:43:00 +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:
commit
967aeddf8a
@ -21,12 +21,12 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
{
|
{
|
||||||
base.OnSelectionChanged();
|
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.CanRotate = quad.Width > 0 || quad.Height > 0;
|
||||||
SelectionBox.CanScaleX = canOperate;
|
SelectionBox.CanScaleX = quad.Width > 0;
|
||||||
SelectionBox.CanScaleY = canOperate;
|
SelectionBox.CanScaleY = quad.Height > 0;
|
||||||
SelectionBox.CanReverse = canOperate;
|
SelectionBox.CanReverse = EditorBeatmap.SelectedHitObjects.Count > 1 || EditorBeatmap.SelectedHitObjects.Any(s => s is Slider);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnOperationEnded()
|
protected override void OnOperationEnded()
|
||||||
|
Loading…
Reference in New Issue
Block a user