fix ArgumentOutOfRangeException when using ToNotifyCollectionChanged with ObservableDictionary #70
This commit is contained in:
parent
efec73f052
commit
b0bc7c2151
@ -259,7 +259,14 @@ internal class NonFilteredSynchronizedViewList<T, TView> : ISynchronizedViewList
|
|||||||
case NotifyCollectionChangedAction.Add: // Add or Insert
|
case NotifyCollectionChangedAction.Add: // Add or Insert
|
||||||
if (e.IsSingleItem)
|
if (e.IsSingleItem)
|
||||||
{
|
{
|
||||||
listView.Insert(e.NewStartingIndex, e.NewItem.View);
|
if (e.NewStartingIndex == -1)
|
||||||
|
{
|
||||||
|
listView.Add(e.NewItem.View);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listView.Insert(e.NewStartingIndex, e.NewItem.View);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user