From abe47cf64f37f5076b3b8d4930c806cbe52b1385 Mon Sep 17 00:00:00 2001 From: jupfi Date: Mon, 17 Jul 2023 15:54:01 +0200 Subject: [PATCH] Fixed bug with setting changes. --- src/nqrduck_spectrometer/base_spectrometer_view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nqrduck_spectrometer/base_spectrometer_view.py b/src/nqrduck_spectrometer/base_spectrometer_view.py index c51d56c..a72d063 100644 --- a/src/nqrduck_spectrometer/base_spectrometer_view.py +++ b/src/nqrduck_spectrometer/base_spectrometer_view.py @@ -53,7 +53,7 @@ class BaseSpectrometerView(ModuleView): # Add a horizontal layout for the setting layout = QHBoxLayout() # Connect the editingFinished signal to the on_value_changed slot of the setting - line_edit.editingFinished.connect(lambda x=line_edit: setting.on_value_changed(x.text())) + line_edit.editingFinished.connect(lambda x=line_edit, s=setting: s.on_value_changed(x.text())) # Add the label and the line edit to the layout layout.addItem(spacer) layout.addWidget(setting_label)