mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Trigger edition change if playing 10E draft on mobile
This commit is contained in:
@@ -125,20 +125,18 @@ public class AddBasicLandsDialog extends FDialog {
|
||||
cbLandSet.setFont(lblLandSet.getFont());
|
||||
cbLandSet.setAutoClose(false);
|
||||
cbLandSet.setChangedHandler(e -> {
|
||||
landSet = cbLandSet.getSelectedItem();
|
||||
pnlPlains.refreshArtChoices();
|
||||
pnlIsland.refreshArtChoices();
|
||||
pnlSwamp.refreshArtChoices();
|
||||
pnlMountain.refreshArtChoices();
|
||||
pnlForest.refreshArtChoices();
|
||||
onEditionChange();
|
||||
});
|
||||
|
||||
if (editionOptions != null && !editionOptions.isEmpty())
|
||||
{
|
||||
if (editionOptions != null && !editionOptions.isEmpty()) {
|
||||
cbLandSet.setItems(editionOptions, editionOptions.get(0));
|
||||
}
|
||||
|
||||
cbLandSet.setSelectedItem(defaultLandSet);
|
||||
if (cbLandSet.getSelectedItem() == defaultLandSet) {
|
||||
onEditionChange();
|
||||
} else {
|
||||
cbLandSet.setSelectedItem(defaultLandSet);
|
||||
}
|
||||
|
||||
initButton(0, Forge.getLocalizer().getMessage("lblOK"), e -> {
|
||||
CardPool landsToAdd = new CardPool();
|
||||
@@ -232,6 +230,15 @@ public class AddBasicLandsDialog extends FDialog {
|
||||
updateDeckInfoLabel();
|
||||
}
|
||||
|
||||
private void onEditionChange() {
|
||||
landSet = cbLandSet.getSelectedItem();
|
||||
pnlPlains.refreshArtChoices();
|
||||
pnlIsland.refreshArtChoices();
|
||||
pnlSwamp.refreshArtChoices();
|
||||
pnlMountain.refreshArtChoices();
|
||||
pnlForest.refreshArtChoices();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float layoutAndGetHeight(float width, float maxHeight) {
|
||||
float padding = FOptionPane.PADDING;
|
||||
|
||||
Reference in New Issue
Block a user