Browse Source

Update ListViewFlickerFree.cs

pull/2510/head
2dust 2 years ago
parent
commit
5aa27c14c6
  1. 15
      v2rayN/v2rayN/Base/ListViewFlickerFree.cs

15
v2rayN/v2rayN/Base/ListViewFlickerFree.cs

@ -93,5 +93,20 @@ namespace v2rayN.Base
DoDragDrop(e.Item, DragDropEffects.Move);
InsertionMark.Index = -1;
}
public void SetScrollPosition(int pos)
{
pos = Math.Min(Items.Count - 1, pos);
if (pos < 0 || pos >= Items.Count)
return;
EnsureVisible(pos);
for (int i = 0; i < 10; i++)
{
if (TopItem != null && TopItem.Index != pos)
TopItem = Items[pos];
}
}
}
}
Loading…
Cancel
Save