Fix duration display in edit form

This commit is contained in:
Kumi 2024-04-03 20:19:13 +02:00
parent f1eecd5959
commit b9acf8d370
Signed by: kumi
GPG key ID: 5D1CE6AF1805ECA2

View file

@ -383,7 +383,7 @@ class EventOptionsWidget(QWidget):
duration_label = QLabel("Duration:")
duration_lineedit = QLineEdit()
unit_label = QLabel("µs")
duration_lineedit.setText(str(self.event.duration * Decimal(1e6)))
duration_lineedit.setText("%.16g" % (self.event.duration * Decimal(1e6)))
duration_layout.addWidget(duration_label)
duration_layout.addWidget(duration_lineedit)
duration_layout.addWidget(unit_label)