Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4876 Fix Unit Display General tab rendered blank when switching units. #4939

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

HoneySkull
Copy link
Collaborator

@HoneySkull HoneySkull commented Dec 2, 2023

This is a proposed fix for #4876. This code change moves the unit display select entity logic before BoardView setup and rendering methods. I cannot 100% explain why this order of operations works, but it seems to be race condition in the Java Swing component repainting that occurs as methods like BoardView.setHighlightColor() trigger a repaint().

It doesn't appear there are any side-effects to moving this call up in the order of operations as it appears all the other tabs update as expected as new units are selected in the movement phase.

Fixes #4876
Fixed #4444

@kuronekochomusuke
Copy link
Collaborator

this fixes the unit summary for me, but I am still getting blank move and skip movement buttons when zoomed out to the max

image

@HoneySkull
Copy link
Collaborator Author

this fixes the unit summary for me, but I am still getting blank move and skip movement buttons when zoomed out to the max

image

I've been able to reproduce the blank move menu only by setting the skin to "plainSkin.xml" in the client settings as described in the earlier issue #4444. This fix doesn't fix both the issues, but I have a hunch they both have a similar root cause.

@kuronekochomusuke
Copy link
Collaborator

it now fixes both issues for me

@NickAragua NickAragua merged commit b7747cd into MegaMek:master Dec 5, 2023
4 checks passed
@HoneySkull HoneySkull deleted the general_tab_blank branch January 11, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants