Source: EasyReflectometryApp/Backends/Py/logic/parameters.py:155-189 — DEEP_ANALYSIS.md §5 item 2
set_current_parameter_value / set_current_parameter_min / set_current_parameter_max have two defects:
float(new_value) is evaluated in the if condition outside the try, so a non-numeric value raises uncaught.
- When the inner assignment's
ValueError is swallowed, the method still return True, telling the proxy a change happened (cache cleared, signals emitted) when nothing actually changed.
Impact: Data integrity — the UI reflects a value change that did not occur. The parameter table desynchronizes from the model.
Fix: Move the float() conversion inside the try; return False on failure so callers don't emit change signals.
Source:
EasyReflectometryApp/Backends/Py/logic/parameters.py:155-189— DEEP_ANALYSIS.md §5 item 2set_current_parameter_value/set_current_parameter_min/set_current_parameter_maxhave two defects:float(new_value)is evaluated in theifcondition outside thetry, so a non-numeric value raises uncaught.ValueErroris swallowed, the method stillreturn True, telling the proxy a change happened (cache cleared, signals emitted) when nothing actually changed.Impact: Data integrity — the UI reflects a value change that did not occur. The parameter table desynchronizes from the model.
Fix: Move the
float()conversion inside thetry;return Falseon failure so callers don't emit change signals.