Browse Source

Fix comparison.

The first element is index 0.
pull/10788/head
Steven Kirk 4 years ago
parent
commit
58676fb417
  1. 2
      src/Avalonia.Controls/VirtualizingStackPanel.cs

2
src/Avalonia.Controls/VirtualizingStackPanel.cs

@ -1088,7 +1088,7 @@ namespace Avalonia.Controls
++newIndex; ++newIndex;
} }
if (realizedIndex <= 0) if (realizedIndex < 0)
{ {
// The insertion point was before the first element, update the first index. // The insertion point was before the first element, update the first index.
_firstIndex += count; _firstIndex += count;

Loading…
Cancel
Save