From e4b7751048824d0dec8547e9c78a27ddc7a266d6 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 29 Sep 2024 17:38:28 +0100 Subject: [PATCH] load the index score if it was stored in the state handler --- geest/gui/widgets/indicator_index_score_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geest/gui/widgets/indicator_index_score_widget.py b/geest/gui/widgets/indicator_index_score_widget.py index aaf5cdf1..d9e1246f 100644 --- a/geest/gui/widgets/indicator_index_score_widget.py +++ b/geest/gui/widgets/indicator_index_score_widget.py @@ -16,7 +16,7 @@ def add_internal_widgets(self) -> None: self.index_input: QDoubleSpinBox = QDoubleSpinBox() self.layout.addWidget(self.info_label) self.layout.addWidget(self.index_input) - + self.index_input.setValue(self.attributes["Default Index Score"]) # Connect the valueChanged signal to update data self.index_input.valueChanged.connect(self.update_data) except Exception as e: @@ -27,7 +27,7 @@ def get_data(self) -> dict: Return the data as a dictionary, updating attributes with current value. """ if self.isChecked(): - self.attributes["IndexScore"] = self.index_input.value() + self.attributes["Default Index Score"] = self.index_input.value() return self.attributes def set_internal_widgets_enabled(self, enabled: bool) -> None: