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

Fixed Used Parts Value Multipliers Incorrectly Resetting to 0 #4141

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

IllianiCBT
Copy link
Collaborator

@IllianiCBT IllianiCBT commented Jun 3, 2024

I tracked down the source of #3993: when 'reverse quality names' is toggled it removes and then recreates the finances tab. However, prior to this PR, the new tab didn't call any getters or setters to determine what the values were previously. Instead it just used default values (which, for parts value multipliers, happened to be 0). This bug affected everything in the finances tab and any new additions to that tab will need to be added to the list of setters and getters added by this PR.

Toggling the 'reverse quality names' checkbox will now call the last saved values for each of the finance tab's options. This means changes made prior to the last time the campaign options were saved will be lost. A warning has been added to the tooltip for this option, to reflect this.

There is another recreateXPanel function (recreateSPAPanel on line 8197) that should be investigated by someone smarter than I, to ensure that too is not replicating this issue. I tried to fathom it, but it proved beyond me at this time.

Closes #3993

…lity names

- Updated tooltip text for 'reverseQualityNames' checkbox in 'CampaignOptionsDialog.properties'
- Simplified the ActionListener logic for 'reverseQualityNames' checkbox in 'CampaignOptionsPane.java'
- Ensured recreating the 'financesPanel' doesn't reset all options to their default values
- Fixed grammar in comment about 'infantryDontCount' option
@IllianiCBT IllianiCBT added the Bug label Jun 3, 2024
@IllianiCBT IllianiCBT self-assigned this Jun 3, 2024
@SJuliez SJuliez merged commit b410e4f into MegaMek:master Jun 6, 2024
4 checks passed
@IllianiCBT IllianiCBT changed the title Fixed Used Parts Value Multipliers set to 0 Fixed Used Parts Value Multipliers Incorrectly Resetting to 0 Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[49.18] Used Parts Value Multipliers set to 0
2 participants