Setting accept button label properly

New Deck is set when current deck is empty

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit is contained in:
leriomaggio
2021-10-15 20:32:59 +01:00
parent 350c6a6fa4
commit ccf556f01b

View File

@@ -236,7 +236,8 @@ public class DeckImport<TModel extends DeckBase> extends FDialog {
this.currentGameType = currentGameType.name(); this.currentGameType = currentGameType.name();
this.controller.setAllowedSections(supportedSections); this.controller.setAllowedSections(supportedSections);
this.cmdAcceptButton = new FButton(IMPORT_CARDS_CMD_LABEL); String cmdBtnLabel = currentDeckIsNotEmpty ? IMPORT_CARDS_CMD_LABEL : CREATE_NEW_DECK_CMD_LABEL;
this.cmdAcceptButton = new FButton(cmdBtnLabel);
this.statsView = new VStatisticsImporter(this.controller.currentGameFormatAllowsCommander()); this.statsView = new VStatisticsImporter(this.controller.currentGameFormatAllowsCommander());
this.cStatsView = new CStatisticsImporter(this.statsView); this.cStatsView = new CStatisticsImporter(this.statsView);
initUIComponents(g, currentDeckIsNotEmpty); initUIComponents(g, currentDeckIsNotEmpty);