Skip to content

Conversation

@cbentejac
Copy link
Contributor

Description

This PR is a follow-up to #2836 and #2892 and prevents refreshing the status of the ExpressionTextField when the text field has not been changed by the user. This fixes some unwanted value updates that would occur when a field was losing the focus despite having undergone no change at all.

Additionally, floating values are not set to a fixed number of digits anymore, thus allowing to set precise floating values to attributes if desired.

…anged`

The `textChanged` variable created ambiguity, since `TextFields` already
have a `textChanged()` signal. It was thus unclear when the
`onTextChanged` slot was triggered.

Renaming the `textChanged` property to `exprTextChanged` ensures that
`onTextChanged` is only triggered when the content of the text field
itself is changed by the user.
…hanged

This prevents validating default `evaluatedValue` when the user has not
performed any change.
If the `ExpressionTextField` is meant for an integer (`isInt = true`),
then the value of the expression should be an integer, meaning rounding
may need to be applied. However, for floating numbers, we do not want
to lose some precision, so the value should never be rounded or set
to a fixed number of decimal digits.
Floating numbers should not have a fixed number of decimals to avoid
losing precision, so the `decimals` property is not needed anymore.

References to it are removed in the HdrImageToolbar.
@cbentejac cbentejac added this to the Meshroom 2026.1.0 milestone Oct 8, 2025
@cbentejac cbentejac self-assigned this Oct 8, 2025
@cbentejac cbentejac changed the title ExpressionTextFields: Fix unwanted value updates [qml] ExpressionTextFields: Fix unwanted value updates Oct 8, 2025
@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.61%. Comparing base (e88f34a) to head (c633ae0).
⚠️ Report is 5 commits behind head on develop.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2911   +/-   ##
========================================
  Coverage    80.61%   80.61%           
========================================
  Files           55       55           
  Lines         7692     7692           
========================================
  Hits          6201     6201           
  Misses        1491     1491           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cbentejac cbentejac merged commit 7cac2bf into develop Oct 8, 2025
4 checks passed
@cbentejac cbentejac deleted the fix/expressionTextFields branch October 8, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants