Skip to content

Revamp params

Compare
Choose a tag to compare
@jdranczewski jdranczewski released this 22 Nov 17:38
· 76 commits to main since this release

The previous design of how params handled being set programmatically and from input fields mostly worked, but was rather convoluted, and limited the precision of the stored value to the display precision, which is very silly.

The back-end way params work and the associated signalling has thus been reworked, and new tests were introduced to test for correctness of the new behaviour.

See af35244 for the exact changes, but most of the behaviour should be unchanged. Most notably:

  • params no longer have limited precision, should go as precise as float allows
  • the changed Signal is now emitted every time set_value is called, even if the value didn't necessarily change
  • if implementing custom params, _input_set_value should block any Signals emitted by changing the input using this method. This can be achieved using self.input.blockSignals(True) and self.input.blockSignals(False)