Skip to content

Commit

Permalink
Prevent phantom popup after panning
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleet01 committed Jul 18, 2024
1 parent 71b9705 commit 587df46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions megamek/src/megamek/client/ui/swing/boardview/BoardView.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ public void mouseMoved(MouseEvent e) {
disp.isMouseOver(point, drawDimension);
}

// Reset popup flag if the user moves their mouse away
wantsPopup = false;

final Coords mcoords = getCoordsAt(point);
if (!mcoords.equals(lastCoords) && game.getBoard().contains(mcoords)) {
lastCoords = mcoords;
Expand Down Expand Up @@ -3819,6 +3822,7 @@ public void mouseReleased(MouseEvent me) {
scrollYDifference = 0;
dragging = false;
shouldScroll = false;
wantsPopup = false;
boardPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

Expand Down

0 comments on commit 587df46

Please sign in to comment.