mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 20:32:55 +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;
|
get => current;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (current != null)
|
current?.UnbindAll();
|
||||||
{
|
current = value.GetBoundCopy();
|
||||||
current.ValueChanged -= onValueChanged;
|
|
||||||
current.DefaultChanged -= onDefaultChanged;
|
|
||||||
current.DisabledChanged -= onDisabledChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
current = value;
|
|
||||||
|
|
||||||
current.ValueChanged += onValueChanged;
|
current.ValueChanged += onValueChanged;
|
||||||
current.DefaultChanged += onDefaultChanged;
|
current.DefaultChanged += onDefaultChanged;
|
||||||
|
Loading…
Reference in New Issue
Block a user