mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-29 03:30:43 +12:00
Select first item after filtering
This commit is contained in:
parent
5c017603f0
commit
2d6eee7ef2
|
@ -170,8 +170,14 @@ private void ApplyFilter(HistoryFilter filter)
|
|||
UpdateTitle(filteredHistoryItems);
|
||||
|
||||
listViewCache = null;
|
||||
listViewFirstItem = 0;
|
||||
lvHistory.VirtualListSize = 0;
|
||||
|
||||
if (filteredHistoryItems.Length > 0)
|
||||
{
|
||||
lvHistory.VirtualListSize = filteredHistoryItems.Length;
|
||||
lvHistory.SelectedIndices.Add(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,7 +247,7 @@ private ListViewItem CreateListViewItem(int index)
|
|||
lvi.ImageIndex = 3;
|
||||
}
|
||||
|
||||
lvi.SubItems.Add(hi.DateTime.ToString()).Tag = hi.DateTime;
|
||||
lvi.SubItems.Add(hi.DateTime.ToString());
|
||||
lvi.SubItems.Add(hi.FileName);
|
||||
lvi.SubItems.Add(hi.URL);
|
||||
lvi.Tag = hi;
|
||||
|
|
Loading…
Reference in a new issue