Fixed fast search compatibly with non string data models

This commit is contained in:
Oleg Agafonov 2017-12-31 00:26:54 +04:00
parent c6d27bb3c9
commit b697346cb6
3 changed files with 12 additions and 6 deletions

View file

@ -181,7 +181,7 @@ public class PickChoiceDialog extends MageDialog {
// start selection
if((startSelectionValue != null)){
int selectIndex = -1;
for(int i = 0; i < this.listChoices.getModel().getSize() - 1; i++){
for(int i = 0; i < this.listChoices.getModel().getSize(); i++){
KeyValueItem listItem = (KeyValueItem)this.listChoices.getModel().getElementAt(i);
if (listItem.Key.equals(startSelectionValue)){
selectIndex = i;