mirror of
https://github.com/ShareX/ShareX.git
synced 2024-06-28 19:20:27 +12:00
Automatically select first item after filtering
This commit is contained in:
parent
27e1bf9514
commit
f4188f2c75
|
@ -245,6 +245,11 @@ private void AddHistoryItems(HistoryItem[] historyItems)
|
|||
lvHistory.FillLastColumn();
|
||||
lvHistory.Focus();
|
||||
|
||||
if (lvHistory.Items.Count > 0)
|
||||
{
|
||||
lvHistory.Items[0].Selected = true;
|
||||
}
|
||||
|
||||
Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
|
@ -323,8 +328,6 @@ private void HistoryForm_Shown(object sender, EventArgs e)
|
|||
|
||||
if (lvHistory.Items.Count > 0)
|
||||
{
|
||||
lvHistory.Items[0].Selected = true;
|
||||
|
||||
cbTypeFilterSelection.Items.Clear();
|
||||
cbTypeFilterSelection.Items.AddRange(allHistoryItems.Select(x => x.Type).Distinct().Where(x => !string.IsNullOrEmpty(x)).ToArray());
|
||||
|
||||
|
|
Loading…
Reference in a new issue