浏览代码

fixed problem when Removing range items from virtualized ItemsPresenter related to #651

donandren 9 年之前
父节点
当前提交
ba8829399d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs

+ 1 - 1
src/Avalonia.Controls/Presenters/ItemVirtualizerSimple.cs

@@ -125,7 +125,7 @@ namespace Avalonia.Controls.Presenters
 
                     case NotifyCollectionChangedAction.Remove:
                         if (e.OldStartingIndex >= FirstIndex &&
-                            e.OldStartingIndex + e.OldItems.Count <= NextIndex)
+                            e.OldStartingIndex < NextIndex)
                         {
                             RecycleContainersOnRemove();
                         }