GP-3865 - Fixed bug in the Find Dialog that caused incorrect text to be

selected when pressing Enter for a previous match
This commit is contained in:
dragonmacher 2023-09-22 09:43:36 -04:00
parent 3bb95e85ef
commit 5582436349

View File

@ -238,7 +238,6 @@ public class FindDialog extends ReusableDialogComponentProvider {
MutableComboBoxModel<String> model = (MutableComboBoxModel<String>) comboBox.getModel();
model.insertElementAt(text, 0);
model.setSelectedItem(text);
int size = model.getSize();
for (int i = 1; i < size; i++) {
@ -249,5 +248,7 @@ public class FindDialog extends ReusableDialogComponentProvider {
}
}
// do this last since removing items may change the selected item
model.setSelectedItem(text);
}
}