mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Prevent focusing OK button if DualListBox has no specified count needed
This commit is contained in:
@@ -443,8 +443,8 @@ public class DualListBox<T> extends FPanel {
|
|||||||
addButton.setEnabled(sourceListModel.getSize() != 0);
|
addButton.setEnabled(sourceListModel.getSize() != 0);
|
||||||
addAllButton.setEnabled(sourceListModel.getSize() != 0);
|
addAllButton.setEnabled(sourceListModel.getSize() != 0);
|
||||||
|
|
||||||
if (okButton.isEnabled()) {
|
if (sourceListModel.getSize() == targetRemainingSources) {
|
||||||
okButton.requestFocusInWindow();
|
okButton.requestFocusInWindow(); //focus OK button if reached specific number of sources needed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user