Commit d7d25092 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][spinboxes] Implement float64 specific textFromValue

With the default implementation the first input is transformed
into a float so the next value written will go after the comma.
parent 10e134e3
......@@ -265,3 +265,13 @@ class Float64SpinBox(AbstractNumpySpinBox):
valueChanged = pyqtSignal(numpy_type)
minimumChanged = pyqtSignal(numpy_type)
maximumChanged = pyqtSignal(numpy_type)
def textFromValue(self, value):
"""Returns the text version of value
:param value numpy_type: value to change to text
text = self.numpy_type(value).astype("str")
if text.endswith(".0"):
text = text[:-2]
return text
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment