MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
299 stars 288 forks source link

Fixes #5989 Mini map selected unit lags behind when selecting next unit #6002

Closed HoneySkull closed 2 months ago

HoneySkull commented 2 months ago

Fixes #5989 - fixes mimmap selected unit lag when selecting next unit in the movement phase. Fixes #5930 -> reworks FOV lag fix by undoing this fix and making it work with undoing #4444. Fixes #4444 -> reworks the fix for this so that it doesn't require a delayed update.

This reworks prior fixes for lagging Field of View (FOV), lagging minimap selected units, and previously fixed missing display on zoomed out maps.

The prior fix for #4444 delayed the updates to the Unit Display in order to fix the issue with the blank display when zoomed out. Then when code was refactored to remove the current entity from the ClientGUI and use the UnitDisplay selected unit instead, the FOV, minimap, and labels became out of sync with the selected unit.

This change ensures these behaviors all work together.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 29.07%. Comparing base (f844c90) to head (f8cac64). Report is 4 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6002 +/- ## ========================================= Coverage 29.07% 29.07% - Complexity 13956 13960 +4 ========================================= Files 2576 2576 Lines 267398 267395 -3 Branches 47803 47803 ========================================= + Hits 77740 77744 +4 + Misses 185755 185750 -5 + Partials 3903 3901 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.