Fixed Used Parts Value Multipliers Incorrectly Resetting to 0 #4141
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 line8197
) 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