NumericSetting: Stop values from binding to numbered input names. #12655
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.
The problem:
When the "..." button is clicked, the numeric setting is converted to an input expression. Unfortunately integers are also valid keyboard
Input
names and get handled byCoalesceExpression
.Despite the expression being 1, the "Sideways Wii Remote" setting turns off, because the keyboard's 1 key is not being pressed..
When the dialog is closed, the expression is correctly converted to a simple
true
value, but in the meanwhile, it'sfalse
, which is especially strange when quickly opening and closing the advanced window.The Wii Remote Extension setting has the same issue.
The solution:
The sign of the value is always included to not match any
Input
names.Alternatively, instead of always including the
+
sign, decimal places could be always included, but this is maybe equally weird for integer or boolean settings to appear as1.0
. Opinions?