mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Restore the operation of "remove" and "remove all" buttons in DualListBox so that it's possible to remove added elements one by one or all at once without having to add all the elements first.
This commit is contained in:
@@ -428,7 +428,7 @@ public class DualListBox<T> extends FDialog {
|
||||
|
||||
boolean anySize = targetRemainingSourcesMax < 0;
|
||||
boolean canAdd = sourceListModel.getSize() != 0 && (anySize || targetRemainingSourcesMin <= sourceListModel.getSize());
|
||||
boolean canRemove = destListModel.getSize() != 0 && (anySize || targetRemainingSourcesMax >= sourceListModel.getSize());
|
||||
boolean canRemove = destListModel.getSize() != 0;
|
||||
boolean targetReached = anySize || targetRemainingSourcesMin <= sourceListModel.getSize() && targetRemainingSourcesMax >= sourceListModel.getSize();
|
||||
|
||||
autoButton.setEnabled(targetRemainingSourcesMax == 0 && !targetReached && !sideboardingMode);
|
||||
|
||||
Reference in New Issue
Block a user