Fix ctrl+a etc. for duration field - thx rRobis :)

Fix  #8893
This commit is contained in:
Nikolaj Olsson 2024-10-10 20:04:14 +02:00
parent b0df6412d0
commit 371cab9a1b

View File

@ -253,20 +253,6 @@ namespace Nikse.SubtitleEdit.Controls
AddValue(-Increment); AddValue(-Increment);
e.Handled = true; e.Handled = true;
} }
else if (InterceptArrowKeys && e.KeyCode == Keys.Up)
{
AddValue(Increment);
e.Handled = true;
}
else if (e.KeyData != (Keys.Tab | Keys.Shift) &&
e.KeyData != Keys.Tab &&
e.KeyData != Keys.Left &&
e.KeyData != Keys.Right)
{
_dirty = true;
KeyDown?.Invoke(sender, e);
Invalidate();
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.A) else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.A)
{ {
_textBox.SelectAll(); _textBox.SelectAll();
@ -282,6 +268,20 @@ namespace Nikse.SubtitleEdit.Controls
_textBox.Paste(); _textBox.Paste();
e.SuppressKeyPress = true; e.SuppressKeyPress = true;
} }
else if (InterceptArrowKeys && e.KeyCode == Keys.Up)
{
AddValue(Increment);
e.Handled = true;
}
else if (e.KeyData != (Keys.Tab | Keys.Shift) &&
e.KeyData != Keys.Tab &&
e.KeyData != Keys.Left &&
e.KeyData != Keys.Right)
{
_dirty = true;
KeyDown?.Invoke(sender, e);
Invalidate();
}
else else
{ {
KeyDown?.Invoke(sender, e); KeyDown?.Invoke(sender, e);
@ -407,6 +407,7 @@ namespace Nikse.SubtitleEdit.Controls
{ {
e.Handled = !(DecimalPlaces > 0); e.Handled = !(DecimalPlaces > 0);
} }
else else
{ {
e.Handled = true; e.Handled = true;