mirror of https://github.com/ppy/osu
Add other affectable change action cases
This commit is contained in:
parent
a985e3b8d3
commit
8132852753
|
@ -72,11 +72,21 @@ protected SkinProvidingContainer()
|
|||
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Reset:
|
||||
case NotifyCollectionChangedAction.Remove:
|
||||
foreach (var source in args.OldItems.Cast<ISkin>().OfType<ISkinSource>())
|
||||
source.SourceChanged -= OnSourceChanged;
|
||||
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Replace:
|
||||
foreach (var source in args.OldItems.Cast<ISkin>().OfType<ISkinSource>())
|
||||
source.SourceChanged -= OnSourceChanged;
|
||||
|
||||
foreach (var source in args.NewItems.Cast<ISkin>().OfType<ISkinSource>())
|
||||
source.SourceChanged += OnSourceChanged;
|
||||
|
||||
break;
|
||||
}
|
||||
}), true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue