fix(color): EditNumber class not implementing zeroText logic #4611
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.
For Color Radios, small display inconsistency/bug.
Class EditNumber has the option to replace a zero value for any other text. But was not working.
Looking at the code, there is no logic to handle the ZeroText.
NOTE: this fix is only for the main (2.10) branch.
On branch 2.9, this code is in basenumberedit (BaseNumberEdit class). Let me know if you want a PR specific for 2,9
Example Screen: Telemetry Sensor Edit, the Ratio should show "-" when 0, and is not. B&W radios works properly.
Example: Mixer Edit, Warning should show "Off" when zero.
Summary of changes:
Libopenui: numberedit (NumberEdit class): Added code to show the zeroText string if the value is 0.
According to the the reference, is only used in 4 pages: