From b9acf8d370ac829941f36217ec6af7e30d4f13a4 Mon Sep 17 00:00:00 2001 From: Kumi Date: Wed, 3 Apr 2024 20:19:13 +0200 Subject: [PATCH] Fix duration display in edit form --- src/nqrduck_pulseprogrammer/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nqrduck_pulseprogrammer/view.py b/src/nqrduck_pulseprogrammer/view.py index 64b93af..174d2cb 100644 --- a/src/nqrduck_pulseprogrammer/view.py +++ b/src/nqrduck_pulseprogrammer/view.py @@ -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)