Skip to content

A number typed into a spinner nobody wrote is the number committed - #440

Merged
RyeMutt merged 1 commit into
developfrom
rye/spin-unset-typed
Oct 11, 2026
Merged

RyeMutt merged 1 commit into
developfrom
rye/spin-unset-typed

Conversation

@RyeMutt

@RyeMutt RyeMutt commented Oct 11, 2026

Copy link
Copy Markdown
Member

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

  • A spinner nobody has written to (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.
  • Committing what was typed calls setUnset(false) before reading the box. Leaving the unset state calls updateEditor(), which wrote the value in force into the box over the typed text. The commit then read that back and committed the old value.
  • After that the spinner is no longer unset, so the second try works. In the debug settings floater this looked like the first entry doing nothing, and like "2" being rejected where "2.0" was accepted, when "2.0" was simply the second try.

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.
  • This covers every way a typed number is committed: Enter, losing focus, the arrow keys and the step buttons. It also covers the separate boxes of a value with several parts, such as a vector's X, Y and Z, since they are spinners too.

Testing

  • New llspinctrl test 6: types "2" into an unset 3-decimal spinner, as the grid builds one, and checks that 2 is committed and shown as 2.000. Without the fix it fails with expected '2' actual '1'.
  • llspinctrl, alpropertygrid, alxuifields and alcolortablepanel pass.
  • Not yet checked in the running viewer.

🤖 Generated with Claude Code

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>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f3d01d51-3b5b-47c0-a596-2e9312b67fb0

📥 Commits

Reviewing files that changed from the base of the PR and between 9290594 and d1c3e99.


📒 Files selected for processing (2)
  • indra/llui/llspinctrl.cpp
  • indra/llui/tests/llspinctrl_test.cpp

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RyeMutt
RyeMutt merged commit 53882b4 into develop Oct 11, 2026
21 of 24 checks passed
@RyeMutt
RyeMutt deleted the rye/spin-unset-typed branch October 11, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant