From 40bd3d5bb8befa06e1078627f3ecb38a0a2246b0 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Tue, 5 Sep 2023 14:43:17 -0400 Subject: [PATCH] Fix generation and saving of talker settings fixes #515 #514 --- comictaggerlib/settingswindow.py | 2 +- comictaggerlib/ui/talkeruigenerator.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/comictaggerlib/settingswindow.py b/comictaggerlib/settingswindow.py index 58c2393..e8a4516 100644 --- a/comictaggerlib/settingswindow.py +++ b/comictaggerlib/settingswindow.py @@ -463,7 +463,7 @@ class SettingsWindow(QtWidgets.QDialog): self.config[0].File_Rename_replacements = self.get_replacements() # Read settings from talker tabs - comictaggerlib.ui.talkeruigenerator.form_settings_to_config(self.sources, self.config) + self.config = comictaggerlib.ui.talkeruigenerator.form_settings_to_config(self.sources, self.config) self.update_talkers_config() diff --git a/comictaggerlib/ui/talkeruigenerator.py b/comictaggerlib/ui/talkeruigenerator.py index 85e3cc4..a4d5d29 100644 --- a/comictaggerlib/ui/talkeruigenerator.py +++ b/comictaggerlib/ui/talkeruigenerator.py @@ -251,7 +251,7 @@ def generate_source_option_tabs( comic_talker_tab_layout.addLayout(talker_layout) # Add source sub tabs to Comic Sources tab - for t_id, talker in talkers.items(): + for t_id, talker in list(talkers.items()): # Add source to general tab dropdown list sources.cbx_sources.addItem(talker.name, t_id) tab = TalkerTab(tab=QtWidgets.QWidget(), widgets={}) @@ -260,12 +260,12 @@ def generate_source_option_tabs( url_option: settngs.Setting | None = None key_option: settngs.Setting | None = None for option in config.definitions[group_for_plugin(talker)].v.values(): - if not option.file: - continue - elif option.dest == f"{t_id}_key": + if option.dest == f"{t_id}_key": key_option = option elif option.dest == f"{t_id}_url": url_option = option + elif not option.file: + continue elif option._guess_type() is bool: current_widget = generate_checkbox(option, layout_grid) tab.widgets[option.dest] = current_widget