forked from External/mage
Recognize double clicks made in rapid succession
Currently they are not recognized, because getClickCount() will be higher than 2 since Java interprets them as quadruple, sextuple, etc. clicks. So, instead of checking for getClickCount() == 2, check for getClickCount() being an even number. This allows to quickly remove or add many cards to a deck.
This commit is contained in:
parent
a9744b2d04
commit
0b8404f0a4
5 changed files with 6 additions and 6 deletions
|
|
@ -183,7 +183,7 @@ public class DraftGrid extends javax.swing.JPanel implements MouseListener {
|
|||
|
||||
@Override
|
||||
public void mouseClicked(MouseEvent e) {
|
||||
if (e.getClickCount() == 2) {
|
||||
if ((e.getClickCount() & 1) == 0 && (e.getClickCount() > 0)) { // double clicks and repeated double clicks
|
||||
if (e.getButton() == MouseEvent.BUTTON1) {
|
||||
Object obj = e.getSource();
|
||||
if (obj instanceof MageCard) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue