Added auto enabled search for all pickup dialogs with many items;

This commit is contained in:
Oleg Agafonov 2017-12-25 09:21:25 +04:00
parent 00d7a1f336
commit 531b5bc569
2 changed files with 13 additions and 1 deletions

View file

@ -168,6 +168,7 @@ public class PickChoiceDialog extends MageDialog {
int maxSel = this.listChoices.getModel().getSize() - 1;
if(newSel <= maxSel){
this.listChoices.setSelectedIndex(newSel);
this.listChoices.ensureIndexIsVisible(newSel);
}
}
@ -175,6 +176,7 @@ public class PickChoiceDialog extends MageDialog {
int newSel = this.listChoices.getSelectedIndex() - 1;
if(newSel >= 0){
this.listChoices.setSelectedIndex(newSel);
this.listChoices.ensureIndexIsVisible(newSel);
}
}