mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Hold a bound copy reference instead
This commit is contained in:
@ -30,14 +30,8 @@ namespace osu.Game.Overlays
|
||||
get => current;
|
||||
set
|
||||
{
|
||||
if (current != null)
|
||||
{
|
||||
current.ValueChanged -= onValueChanged;
|
||||
current.DefaultChanged -= onDefaultChanged;
|
||||
current.DisabledChanged -= onDisabledChanged;
|
||||
}
|
||||
|
||||
current = value;
|
||||
current?.UnbindAll();
|
||||
current = value.GetBoundCopy();
|
||||
|
||||
current.ValueChanged += onValueChanged;
|
||||
current.DefaultChanged += onDefaultChanged;
|
||||
|
Reference in New Issue
Block a user