From e2a4a9b30024f82f9b40885cecf135867b749412 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 4 Nov 2024 10:58:48 +0100 Subject: [PATCH] Fix rotation popover potentially crashing due to activating selection origin just before disabling it --- osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs b/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs index 678d98250a..477d3b4e57 100644 --- a/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs +++ b/osu.Game.Rulesets.Osu/Edit/PreciseRotationPopover.cs @@ -103,6 +103,11 @@ namespace osu.Game.Rulesets.Osu.Edit }); angleInput.Current.BindValueChanged(angle => rotationInfo.Value = rotationInfo.Value with { Degrees = angle.NewValue }); + rotationHandler.CanRotateAroundSelectionOrigin.BindValueChanged(e => + { + selectionCentreButton.Selected.Disabled = !e.NewValue; + }, true); + bool didSelect = false; configRotationOrigin.BindValueChanged(val => @@ -154,11 +159,6 @@ namespace osu.Game.Rulesets.Osu.Edit if (b.NewValue) configRotationOrigin.Value = EditorOrigin.SelectionCentre; }); - rotationHandler.CanRotateAroundSelectionOrigin.BindValueChanged(e => - { - selectionCentreButton.Selected.Disabled = !e.NewValue; - }, true); - rotationInfo.BindValueChanged(rotation => { rotationHandler.Update(rotation.NewValue.Degrees, getOriginPosition(rotation.NewValue));