Minor combo box fix

This commit is contained in:
niksedk 2023-09-03 07:10:33 +02:00
parent df8e18e80e
commit 180889d586
2 changed files with 14 additions and 11 deletions

View File

@ -3369,4 +3369,4 @@ Keep changes?</KeepChangesMessage>
<CommandLineArguments>Extra parameters for Whisper command line:</CommandLineArguments>
<Info>Note: Different Whisper implementations have different command line parameters!</Info>
</WhisperAdvanced>
</Language>
</Language>

View File

@ -946,6 +946,15 @@ namespace Nikse.SubtitleEdit.Controls
var item = _listView.SelectedItems[0];
_selectedIndex = item.Index;
_textBox.Text = item.Text;
HideDropDown();
args.SuppressKeyPress = true;
if (!_skipPaint)
{
Invalidate();
}
if (!_loading)
{
SelectedIndexChanged?.Invoke(this, EventArgs.Empty);
@ -953,13 +962,6 @@ namespace Nikse.SubtitleEdit.Controls
TextChanged?.Invoke(this, EventArgs.Empty);
}
if (!_skipPaint)
{
Invalidate();
}
HideDropDown();
args.SuppressKeyPress = true;
}
else
{
@ -984,6 +986,10 @@ namespace Nikse.SubtitleEdit.Controls
_selectedIndex = i;
_textBox.Text = _listView.Items[i].Text;
HideDropDown();
_textBox.Focus();
_textBox.SelectionLength = 0;
if (!_loading)
{
SelectedIndexChanged?.Invoke(this, EventArgs.Empty);
@ -991,9 +997,6 @@ namespace Nikse.SubtitleEdit.Controls
TextChanged?.Invoke(this, EventArgs.Empty);
}
HideDropDown();
_textBox.Focus();
_textBox.SelectionLength = 0;
return;
}
}