Repository navigation
A number typed into a spinner nobody wrote is the number committed - #440
Merged
Merged
Conversation
An unset spinner shows the number in force behind an empty box. Committing what was typed into it leaves the unset state first, and leaving it wrote the number in force into the box over the typed one before the commit read it back -- so the first number typed into a setting at its default in the debug settings floater, or any property grid field nobody had written, committed the old number, and the second try worked. Leaving the unset state now keeps what is typed and fills the box only where it is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 first number typed into a spinner showing an unset value is now the number committed. Before, it was thrown away and the old number committed in its place.
The problem
setUnset(true)) shows the value in force greyed out behind an empty box. The property grid does this for every number field at its default, including every numeric setting in the debug settings floater that is at its default.setUnset(false)before reading the box. Leaving the unset state callsupdateEditor(), which wrote the value in force into the box over the typed text. The commit then read that back and committed the old value.The change
LLSpinCtrl::setUnset(false)leaves the box as it is when it already holds typed text, and fills it with the value in force only when it is empty.Testing
llspinctrltest 6: types "2" into an unset 3-decimal spinner, as the grid builds one, and checks that 2 is committed and shown as2.000. Without the fix it fails withexpected '2' actual '1'.llspinctrl,alpropertygrid,alxuifieldsandalcolortablepanelpass.🤖 Generated with Claude Code