ObservableFilterCollection - in 'reset(),' clear the target collection if source is empty
This commit is contained in:
1 parent
c8cd2ae1ad
commit
36684f8ee5
1 file changed
+5
-1
@@ -87,7 +87,11 @@ namespace mbts.ui.utility {
|
||||
foreach (var value in source_collection.OfType<INotifyPropertyChanged>())
|
||||
value.PropertyChanged += on_item_PropertyChanged;
|
||||
}
|
||||
CollectionHelper.sync_with_never_duplicate(filtered_collection, source_collection.Where(filter));
|
||||
if (source_collection.Count == 0) {
|
||||
filtered_collection.Clear();
|
||||
} else {
|
||||
CollectionHelper.sync_with_never_duplicate(filtered_collection, source_collection.Where(filter));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user