[Core] Eliminate quiet clears
Really this is an invalid behavior aimed at performing better, but there's nothing backing that up and it's causing issues because not all change hooks are at the top level nor are they required to be.
This commit is contained in:
Родитель
8235928a46
Коммит
3bace18a2c
|
@ -28,10 +28,5 @@ namespace Xamarin.PropertyEditing
|
|||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public void QuietClear()
|
||||
{
|
||||
Items.Clear ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace Xamarin.PropertyEditing
|
|||
{
|
||||
if (key == null) {
|
||||
bool removed = (this.nullGrouping.Count > 0);
|
||||
this.nullGrouping.QuietClear();
|
||||
this.nullGrouping.Clear();
|
||||
if (removed)
|
||||
OnCollectionChanged (new NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction.Remove, this.nullGrouping, this.groupings.Count));
|
||||
|
||||
|
@ -205,7 +205,7 @@ namespace Xamarin.PropertyEditing
|
|||
var g = this.groupings[index];
|
||||
this.groupings.Remove (key);
|
||||
if (ReuseGroups) {
|
||||
g.QuietClear ();
|
||||
g.Clear ();
|
||||
this.oldGroups.Add (key, g);
|
||||
}
|
||||
|
||||
|
@ -218,12 +218,12 @@ namespace Xamarin.PropertyEditing
|
|||
|
||||
public void Clear ()
|
||||
{
|
||||
this.nullGrouping?.QuietClear();
|
||||
this.nullGrouping?.Clear();
|
||||
|
||||
if (ReuseGroups) {
|
||||
foreach (var g in this.groupings.Values) {
|
||||
this.oldGroups.Add (g.Key, g);
|
||||
g.QuietClear ();
|
||||
g.Clear ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче