Skip to content

Commit

Permalink
Ctrl+F now selects Author textbox if Title textbox is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
FenPhoenix committed Sep 28, 2020
1 parent 37e117a commit d9751cb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions AngelLoader/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1175,8 +1175,16 @@ void SelectAndSuppress(int index)
{
if (e.KeyCode == Keys.F)
{
FilterTitleTextBox.Focus();
FilterTitleTextBox.SelectAll();
TextBox? textBox =
FilterTitleTextBox.Visible ? FilterTitleTextBox :
FilterAuthorTextBox.Visible ? FilterAuthorTextBox :
null;

if (textBox != null)
{
textBox.Focus();
textBox.SelectAll();
}
}
else if (e.KeyCode == Keys.Add || e.KeyCode == Keys.Oemplus)
{
Expand Down

0 comments on commit d9751cb

Please sign in to comment.