Browse Source

Fix ClearElementToPinnedPool.

It was previously (incorrectly) implemented the same as `ClearElementToUniqueIdResetPool`.
pull/3068/head
Steven Kirk 7 years ago
parent
commit
a8fc03217a
  1. 11
      src/Avalonia.Controls/Repeater/ViewManager.cs

11
src/Avalonia.Controls/Repeater/ViewManager.cs

@ -581,13 +581,16 @@ namespace Avalonia.Controls
private bool ClearElementToPinnedPool(IControl element, VirtualizationInfo virtInfo, bool isClearedDueToCollectionChange)
{
if (_isDataSourceStableResetPending)
bool moveToPinnedPool =
!isClearedDueToCollectionChange && virtInfo.IsPinned;
if (moveToPinnedPool)
{
_resetPool.Add(element);
virtInfo.MoveOwnershipToUniqueIdResetPoolFromLayout();
_pinnedPool.Add(new PinnedElementInfo(element));
virtInfo.MoveOwnershipToPinnedPool();
}
return _isDataSourceStableResetPending;
return moveToPinnedPool;
}
private void UpdateFocusedElement()

Loading…
Cancel
Save