mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fix ListChooser to accept -1 as a valid max choice number (used e.g. by Dev Mode)
This commit is contained in:
@@ -287,7 +287,7 @@ public class ListChooser<T> {
|
||||
@Override
|
||||
public void valueChanged(final ListSelectionEvent e) {
|
||||
final int num = ListChooser.this.lstChoices.getSelectedIndices().length;
|
||||
ListChooser.this.optionPane.setButtonEnabled(0, (num >= ListChooser.this.minChoices) && (num <= ListChooser.this.maxChoices));
|
||||
ListChooser.this.optionPane.setButtonEnabled(0, (num >= ListChooser.this.minChoices) && (num <= ListChooser.this.maxChoices || ListChooser.this.maxChoices == -1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user