Skip to content

Commit

Permalink
Merge pull request #33 from kawaiSky/patch-replacebugfix
Browse files Browse the repository at this point in the history
ObservableList Replace Bugfix
  • Loading branch information
neuecc authored Mar 25, 2024
2 parents 20a1c35 + 5b50267 commit 1dd9a0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ObservableCollections/ObservableList.Views.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private void SourceCollectionChanged(in NotifyCollectionChangedEventArgs<T> e)
// ObservableList does not support replace range
{
var v = (e.NewItem, selector(e.NewItem));
var ov = (e.OldItem, selector(e.OldItem));
var ov = (e.OldItem, list[e.OldStartingIndex].Item2);
list[e.NewStartingIndex] = v;
filter.InvokeOnReplace(v, ov, e.NewStartingIndex);
break;
Expand Down Expand Up @@ -240,4 +240,4 @@ private void SourceCollectionChanged(in NotifyCollectionChangedEventArgs<T> e)
}
}
}
}
}

0 comments on commit 1dd9a0e

Please sign in to comment.