chore: cleanup repeating code

This commit is contained in:
2026-08-24 19:24:29 +02:00
committed by duan_j
parent 789b2ae6e2
commit 09f81c8392
+1 -7
View File
@@ -108,13 +108,7 @@ class NumberLineEdit(QLineEdit):
@Slot(float)
def update_value(self, val: float):
if abs(val - self.saved_value) > 0.001:
self.blockSignals(True)
self.saved_value = val
self.setText(self.to_string(val))
self.blockSignals(False)
# programmatic rewrite is a commit: the shown value IS the applied one
self._applied_value = val
self._set_pending(False)
self.force_update_value(val)
def force_update_value(self, val: float):
# Always update text and saved_value