From 1a1df6ac824521873a9d439d4865f9fa80d59561 Mon Sep 17 00:00:00 2001 From: Tim Sutton Date: Sun, 29 Sep 2024 17:31:54 +0100 Subject: [PATCH] State handler for last used radio button in indicator config --- geest/gui/indicator_config_widget.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/geest/gui/indicator_config_widget.py b/geest/gui/indicator_config_widget.py index 3e6652d0..00ef506b 100644 --- a/geest/gui/indicator_config_widget.py +++ b/geest/gui/indicator_config_widget.py @@ -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)