Browse Source

Handle inserts before currently visible item.

If a virtualized list was scrolled and an item added before the first
visible item, then the list wasn't updated.
pull/976/head
Steven Kirk 10 years ago
parent
commit
f678683472
  1. 3
      src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs

3
src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs

@ -155,8 +155,7 @@ namespace Avalonia.Controls.Presenters
case NotifyCollectionChangedAction.Add:
CreateAndRemoveContainers();
if (e.NewStartingIndex >= FirstIndex &&
e.NewStartingIndex < NextIndex)
if (e.NewStartingIndex < NextIndex)
{
RecycleContainers();
}

Loading…
Cancel
Save