From 371cab9a1b9dab9d64270f4ebbbb8d5742e47f83 Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Thu, 10 Oct 2024 20:04:14 +0200 Subject: [PATCH] Fix ctrl+a etc. for duration field - thx rRobis :) Fix #8893 --- src/ui/Controls/NikseUpDown.cs | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/ui/Controls/NikseUpDown.cs b/src/ui/Controls/NikseUpDown.cs index 5cd472ef5..fe4a198b5 100644 --- a/src/ui/Controls/NikseUpDown.cs +++ b/src/ui/Controls/NikseUpDown.cs @@ -253,20 +253,6 @@ namespace Nikse.SubtitleEdit.Controls AddValue(-Increment); 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) { _textBox.SelectAll(); @@ -282,6 +268,20 @@ namespace Nikse.SubtitleEdit.Controls _textBox.Paste(); 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 { KeyDown?.Invoke(sender, e); @@ -407,6 +407,7 @@ namespace Nikse.SubtitleEdit.Controls { e.Handled = !(DecimalPlaces > 0); } + else { e.Handled = true;