mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Prevented possible error when closing game panel while popup text is going to be shown.
This commit is contained in:
parent
724d84c532
commit
0074f2a487
1 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue