DraftGrid: replaced double-click by single press.

This commit is contained in:
magenoxx 2011-01-10 21:43:19 +03:00
parent 84a152fea3
commit e9eb3231c3
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -72,7 +72,7 @@ public class DraftPanel extends javax.swing.JPanel {
new Listener<Event> () {
@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());
}
}