From 7fd6bb9d5f98c6ba74b06f827292a5cab875d322 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 26 Jul 2023 14:04:16 +0900 Subject: [PATCH] Fix a couple of code style issues in `SelectionBox` --- osu.Game/Screens/Edit/Compose/Components/SelectionBox.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionBox.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionBox.cs index 53442071b5..ed6bbf7668 100644 --- a/osu.Game/Screens/Edit/Compose/Components/SelectionBox.cs +++ b/osu.Game/Screens/Edit/Compose/Components/SelectionBox.cs @@ -52,7 +52,7 @@ namespace osu.Game.Screens.Edit.Compose.Components } } - private IBindable canRotate = new BindableBool(); + private readonly IBindable canRotate = new BindableBool(); private bool canScaleX; @@ -152,8 +152,7 @@ namespace osu.Game.Screens.Edit.Compose.Components if (RotationHandler != null) canRotate.BindTo(RotationHandler.CanRotate); - canRotate.BindValueChanged(_ => recreate()); - recreate(); + canRotate.BindValueChanged(_ => recreate(), true); } protected override bool OnKeyDown(KeyDownEvent e)