- 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:
Agetian
2014-02-16 09:08:00 +00:00
parent d841ed5858
commit 6c75215113

View File

@@ -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);