Skip to content

Commit

Permalink
Merge pull request #5712 from HoneySkull/fix_move_modifier_envelope
Browse files Browse the repository at this point in the history
Fixes #5700 Clear move modifiers on escape and clear envelope when turned off.
  • Loading branch information
HoneySkull authored Jul 9, 2024
2 parents 076e9f3 + 6292395 commit 075cb6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions megamek/src/megamek/client/ui/swing/MovementDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,8 @@ public void clear() {
// clear board cursors
clientgui.getBoardView().select(null);
clientgui.getBoardView().cursor(null);
// Needed to clear best move modifiers
clientgui.clearTemporarySprites();

if (ce == null) {
return;
Expand Down Expand Up @@ -4342,6 +4344,8 @@ public void gamePhaseChange(GamePhaseChangeEvent e) {
public void computeMovementEnvelope(Entity suggestion) {
// do nothing if deactivated in the settings
if (!GUIP.getMoveEnvelope()) {
// Issue #5700 : Move envelope doesn't clear when turning off move envelopes from menu or shortcut.
clientgui.clearTemporarySprites();
return;
}

Expand Down

0 comments on commit 075cb6b

Please sign in to comment.