mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Make using Find shortcut in its dialog select text
This commit is contained in:
parent
8ecdad90ad
commit
1640d7ffaf
@ -13,6 +13,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
private readonly IFindAndReplace _findAndReplaceMethods;
|
||||
private readonly Keys _findNextShortcut;
|
||||
private readonly Keys _findShortcut;
|
||||
private Regex _regEx;
|
||||
private readonly Subtitle _subtitle;
|
||||
|
||||
@ -42,6 +43,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
UiUtil.FixLargeFonts(this, buttonFind);
|
||||
_findNextShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditFindNext);
|
||||
_findShortcut = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainEditFind);
|
||||
}
|
||||
|
||||
private ReplaceType FindReplaceType
|
||||
@ -122,6 +124,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Focus();
|
||||
ctrl?.Focus();
|
||||
}
|
||||
else if (e.KeyData == _findShortcut)
|
||||
{
|
||||
e.Handled = true;
|
||||
e.SuppressKeyPress = true;
|
||||
if (comboBoxFind.Visible)
|
||||
{
|
||||
comboBoxFind.Focus();
|
||||
comboBoxFind.SelectAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
textBoxFind.Focus();
|
||||
textBoxFind.SelectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonFind_Click(object sender, EventArgs e)
|
||||
|
Loading…
Reference in New Issue
Block a user