Merge pull request #6269 from Flitskikker/feature/ocr-ctrl-enter-use-once

Implement Ctrl+Enter for "use once", remove duplicate Escape clause
This commit is contained in:
Nikolaj Olsson 2022-09-20 13:52:59 -04:00 committed by GitHub
commit 12d97707b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,16 +170,17 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
{
if (e.KeyCode == Keys.Enter)
{
if (e.Modifiers == Keys.Control)
{
UseOnce = true;
}
DialogResult = DialogResult.OK;
}
else if (e.KeyCode == Keys.Escape)
{
DialogResult = DialogResult.Cancel;
}
else if (e.KeyCode == Keys.Escape)
{
DialogResult = DialogResult.Cancel;
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.I)
{
checkBoxItalic.Checked = !checkBoxItalic.Checked;