* Prevented possible error when closing game panel while popup text is going to be shown.

This commit is contained in:
LevelX2 2014-02-18 01:09:15 +01:00
parent 724d84c532
commit 0074f2a487

View file

@ -725,8 +725,11 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
if (!popupShowing) { if (!popupShowing) {
synchronized (this) { synchronized (this) {
if (!popupShowing) { if (!popupShowing) {
popupShowing = true; TransferData transferData = getTransferDataForMouseEntered();
callback.mouseEntered(e, getTransferDataForMouseEntered()); if (this.isShowing()) {
popupShowing = true;
callback.mouseEntered(e, transferData);
}
} }
} }
} }
@ -790,7 +793,11 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
data.gameId = this.gameId; data.gameId = this.gameId;
data.popupOffsetX = isTapped() ? cardHeight + cardXOffset + POPUP_X_GAP : cardWidth + cardXOffset + POPUP_X_GAP; data.popupOffsetX = isTapped() ? cardHeight + cardXOffset + POPUP_X_GAP : cardWidth + cardXOffset + POPUP_X_GAP;
data.popupOffsetY = 40; data.popupOffsetY = 40;
data.locationOnScreen = this.getLocationOnScreen(); if (this.isShowing()) {
data.locationOnScreen = this.getLocationOnScreen();
} else {
}
return data; return data;
} }