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

Fix broken torso twist regression while updating weapon panel heat. #5944

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

HoneySkull
Copy link
Collaborator

This PR is to fix to update #5910 which inadvertently broke torso twisting when fixing #5902.

The reason #5910 broke torso twisting is because the call to re-display mech also resets the weapon list model.

This fix uses the same approach but remembers the currently selected unit's selected weapon and then resets it when clearing attacks.

Fixes #5650 again.

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.91%. Comparing base (7e11fae) to head (180826d).
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5944      +/-   ##
============================================
- Coverage     28.91%   28.91%   -0.01%     
+ Complexity    13945    13943       -2     
============================================
  Files          2539     2539              
  Lines        268383   268400      +17     
  Branches      47937    47943       +6     
============================================
- Hits          77607    77606       -1     
- Misses       186816   186828      +12     
- Partials       3960     3966       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HammerGS HammerGS merged commit 38c5c63 into MegaMek:master Aug 24, 2024
5 checks passed
@HammerGS
Copy link
Member

I’ll catch up the merge commit later this evening when home.

@HoneySkull HoneySkull deleted the torso_twist_fix_2 branch August 25, 2024 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.49.20 Dev. Weapons unselect after twisting the unit.
3 participants