Skip to content

Commit

Permalink
State handler for last used radio button in indicator config
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Sep 29, 2024
1 parent 797e285 commit 1a1df6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions geest/gui/indicator_config_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,13 @@ def create_radio_buttons(self, attributes_dict: dict) -> None:
"""
Uses the factory to create radio buttons from attributes dictionary.
"""
analysis_mode = attributes_dict.get("Analysis Mode", "")
for key, value in attributes_dict.items():
radio_button_widget = RadioButtonFactory.create_radio_button(
key, value, attributes_dict)
if radio_button_widget:
if key == analysis_mode:
radio_button_widget.setChecked(True)
self.button_group.addButton(radio_button_widget)
self.layout.addWidget(radio_button_widget.get_container())
radio_button_widget.data_changed.connect(self.update_attributes)
Expand Down

0 comments on commit 1a1df6a

Please sign in to comment.