Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

scientific_spinbox: fix stepBy ignoring precision#2945

Open
SimonRenblad wants to merge 1 commit into
m-labs:masterfrom
SimonRenblad:spinbox_fp_error
Open

scientific_spinbox: fix stepBy ignoring precision#2945
SimonRenblad wants to merge 1 commit into
m-labs:masterfrom
SimonRenblad:spinbox_fp_error

Conversation

@SimonRenblad

Copy link
Copy Markdown
Contributor

Stepping with arrow buttons or shift scrolling on NumberEntryFloat does not currently respect precision.

Example:

precision: 1
step: 0.1
displayed: 1.4
submitted:1.3999999....

In the case of stepping to 0, it may also display a small FP value (~1e-17), instead of 0.

Proposed fix:
Round to appropriate decimals after each step.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant