diff --git a/MekHQ/src/mekhq/gui/CampaignGUI.java b/MekHQ/src/mekhq/gui/CampaignGUI.java index e27d869d2b..8e2c98ee49 100644 --- a/MekHQ/src/mekhq/gui/CampaignGUI.java +++ b/MekHQ/src/mekhq/gui/CampaignGUI.java @@ -1112,7 +1112,19 @@ private void initTopButtons() { String padding = " "; JButton btnAdvanceDay = new JButton(padding + resourceMap.getString("btnAdvanceDay.text") + padding); btnAdvanceDay.setToolTipText(resourceMap.getString("btnAdvanceDay.toolTipText")); - btnAdvanceDay.addActionListener(evt -> getCampaignController().advanceDay()); + btnAdvanceDay.addActionListener(evt -> { + // We disable the button here, as we don't want the user to be able to advance day + // again, until after Advance Day has completed. + btnAdvanceDay.setEnabled(false); + + SwingUtilities.invokeLater(() -> { + try { + getCampaignController().advanceDay(); + } finally { + btnAdvanceDay.setEnabled(true); + } + }); + }); btnAdvanceDay.setMnemonic(KeyEvent.VK_A); gridBagConstraints = new GridBagConstraints(); gridBagConstraints.gridx = 2;