Skip to content

Commit

Permalink
Ensure Flight Path and Time Delay Display Three Decimal Places (#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
samtygier-stfc authored Dec 12, 2024
2 parents 1f736d2 + 10cf458 commit d202ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2432: Ensure Flight Path and Time Delay Display Three Decimal Places
4 changes: 3 additions & 1 deletion mantidimaging/gui/widgets/spectrum_widgets/tof_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def setupUi(self):
self.flightPathSpinBox.setSuffix(" m")
self.flightPathSpinBox.setMinimum(0)
self.flightPathSpinBox.setMaximum(1e10)
self.flightPathSpinBox.setDecimals(3)
self.flightPathSpinBox.setObjectName("flightPathSpinBox")
layout.addWidget(self.flightPathSpinBox, 0, 1)

Expand All @@ -58,6 +59,7 @@ def setupUi(self):
self.timeDelaySpinBox = QtWidgets.QDoubleSpinBox(self)
self.timeDelaySpinBox.setSuffix(" \u03BCs")
self.timeDelaySpinBox.setMaximum(1e10)
self.timeDelaySpinBox.setDecimals(3)
self.timeDelaySpinBox.setObjectName("timeDelaySpinBox")
layout.addWidget(self.timeDelaySpinBox, 1, 1)

Expand All @@ -71,7 +73,7 @@ def flight_path(self) -> float:
return self.flightPathSpinBox.value()

@flight_path.setter
def flight_path(self, value: float):
def flight_path(self, value: float) -> None:
self.flightPathSpinBox.setValue(value)

@property
Expand Down

0 comments on commit d202ab5

Please sign in to comment.