diff --git a/rascal2/widgets/inputs.py b/rascal2/widgets/inputs.py index 39b7033..b69b3aa 100644 --- a/rascal2/widgets/inputs.py +++ b/rascal2/widgets/inputs.py @@ -103,7 +103,7 @@ def textFromValue(self, value): The string displayed on the spinbox. """ - return f"{value:.{self.decimals()}g}" + return f"{round(value, self.decimals()):.{self.decimals()}g}" def validate(self, input, pos) -> tuple[QtGui.QValidator.State, str, int]: """Validate a string written into the spinbox.