mirror of https://github.com/2dust/v2rayN
Update ListViewFlickerFree.cs
parent
a5e9edb2e5
commit
5aa27c14c6
|
@ -93,5 +93,20 @@ namespace v2rayN.Base
|
||||||
DoDragDrop(e.Item, DragDropEffects.Move);
|
DoDragDrop(e.Item, DragDropEffects.Move);
|
||||||
InsertionMark.Index = -1;
|
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…
Reference in New Issue