Skip to content

Commit

Permalink
load the index score if it was stored in the state handler
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Sep 29, 2024
1 parent 1a1df6a commit e4b7751
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geest/gui/widgets/indicator_index_score_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit e4b7751

Please sign in to comment.