From ba558f9a18032148a2936eedf874d90c97c7d46c Mon Sep 17 00:00:00 2001 From: sprangg Date: Sun, 3 Jul 2022 01:20:41 +0300 Subject: [PATCH] Fix the UI pitfall of double spacebar press quitting a draft (#9193) * Switch draft's quit dialog's yes/no buttons so that yes isn't enabled by default * TounramentPanel's quit button also adjusted for the sake of consistency. Co-authored-by: sprangg --- Mage.Client/src/main/java/mage/client/draft/DraftPanel.java | 4 ++-- .../src/main/java/mage/client/tournament/TournamentPanel.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java index 55c564ca7f..241545a9ff 100644 --- a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java +++ b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java @@ -821,8 +821,8 @@ private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the draft tournament?"); - message.setButton1("No", null); - message.setButton2("Yes", PlayerAction.CLIENT_QUIT_DRAFT_TOURNAMENT); + message.setButton1("Yes", PlayerAction.CLIENT_QUIT_DRAFT_TOURNAMENT); + message.setButton2("No", null); message.setTournamentId(draftId); MageFrame.getInstance().showUserRequestDialog(message); }//GEN-LAST:event_btnQuitTournamentActionPerformed diff --git a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java index d2112da2de..ee3fe1e956 100644 --- a/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java +++ b/Mage.Client/src/main/java/mage/client/tournament/TournamentPanel.java @@ -490,8 +490,8 @@ public class TournamentPanel extends javax.swing.JPanel { private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the tournament?"); - message.setButton1("No", null); - message.setButton2("Yes", PlayerAction.CLIENT_QUIT_TOURNAMENT); + message.setButton1("Yes", PlayerAction.CLIENT_QUIT_TOURNAMENT); + message.setButton2("No", null); message.setTournamentId(tournamentId); MageFrame.getInstance().showUserRequestDialog(message); }//GEN-LAST:event_btnQuitTournamentActionPerformed