From e9eb3231c3102bc8f0db1c14fc5371dd343a30c7 Mon Sep 17 00:00:00 2001 From: magenoxx Date: Mon, 10 Jan 2011 21:43:19 +0300 Subject: [PATCH] DraftGrid: replaced double-click by single press. --- .../src/main/java/mage/client/cards/DraftGrid.java | 8 ++++++-- .../src/main/java/mage/client/draft/DraftPanel.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java index 893da4a723..7b27759b3d 100644 --- a/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java +++ b/Mage.Client/src/main/java/mage/client/cards/DraftGrid.java @@ -94,17 +94,21 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener { @Override public void mouseClicked(MouseEvent e) { - if (e.getClickCount() == 2 && !e.isConsumed()) { + /*if (e.getClickCount() == 2 && !e.isConsumed()) { e.consume(); Object obj = e.getSource(); if (obj instanceof MageCard) { this.cardEventSource.doubleClick(((MageCard)obj).getOriginal().getId(), "double-click"); } - } + }*/ } @Override public void mousePressed(MouseEvent e) { + Object obj = e.getSource(); + if (obj instanceof MageCard) { + this.cardEventSource.doubleClick(((MageCard)obj).getOriginal().getId(), "pick-a-card"); + } } @Override 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 189b3ba36f..394c1e4bdd 100644 --- a/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java +++ b/Mage.Client/src/main/java/mage/client/draft/DraftPanel.java @@ -72,7 +72,7 @@ public class DraftPanel extends javax.swing.JPanel { new Listener () { @Override public void event(Event event) { - if (event.getEventName().equals("double-click")) { + if (event.getEventName().equals("pick-a-card")) { session.sendCardPick(draftId, (UUID)event.getSource()); } }