Skip to content

Commit ee521cc

Browse files
Fix exception in RegexHelperDialog
Insert new items into comboBox dataSource - _expressionHistoryList and _testtextHistoryList instead of directly into comboBox.Items.
1 parent 2cd9cc2 commit ee521cc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/LogExpert.UI/Dialogs/RegexHelperDialog.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ private void OnCaseSensitiveCheckBoxCheckedChanged (object sender, EventArgs e)
109109
private void OnButtonOkClick (object sender, EventArgs e)
110110
{
111111
var text = comboBoxRegex.Text;
112-
comboBoxRegex.Items.Remove(text);
113-
comboBoxRegex.Items.Insert(0, text);
112+
_ = _expressionHistoryList.Remove(text);
113+
_expressionHistoryList.Insert(0, text);
114114

115115
text = comboBoxTestText.Text;
116-
comboBoxTestText.Items.Remove(text);
117-
comboBoxTestText.Items.Insert(0, text);
116+
_ = _testtextHistoryList.Remove(text);
117+
_testtextHistoryList.Insert(0, text);
118118

119119
if (comboBoxRegex.Items.Count > MAX_HISTORY)
120120
{

0 commit comments

Comments
 (0)