mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Hold a bound copy reference instead
This commit is contained in:
parent
612ed6353c
commit
83578e7c9d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user