Browse Source

Off-by-one error.

pull/4659/head
Steven Kirk 6 years ago
parent
commit
293564e704
  1. 2
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

2
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@ -781,7 +781,7 @@ namespace Avalonia.Controls.Primitives
if (AutoScrollToSelectedItem && if (AutoScrollToSelectedItem &&
!_hasScrolledToSelectedItem && !_hasScrolledToSelectedItem &&
Presenter is object && Presenter is object &&
Selection.AnchorIndex > 0 && Selection.AnchorIndex >= 0 &&
((IVisual)this).IsAttachedToVisualTree) ((IVisual)this).IsAttachedToVisualTree)
{ {
ScrollIntoView(Selection.AnchorIndex); ScrollIntoView(Selection.AnchorIndex);

Loading…
Cancel
Save