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