From 45c3cb762d2f7f977a2c2ce2e2f57537f5e96534 Mon Sep 17 00:00:00 2001 From: Timothee 'TTimo' Besset <ttimo@valvesoftware.com> Date: Thu, 15 Feb 2024 11:10:25 -0600 Subject: [PATCH] auto-save title settings before doing auto-upload triggers, make this consistent with manual uploads --- client/devkit_client/gui2/gui2.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/client/devkit_client/gui2/gui2.py b/client/devkit_client/gui2/gui2.py index 3193ccb..1b28a58 100644 --- a/client/devkit_client/gui2/gui2.py +++ b/client/devkit_client/gui2/gui2.py @@ -1836,10 +1836,14 @@ class UpdateTitle(ToolWindow): if gameid is None: self.apply_default_settings() self.selected_config = '' - return + return True + if self.selected_config == gameid: + # no change, not restoring settings + return False self.selected_config = gameid self.settings[UpdateTitle.SELECTED_CONFIG_KEY] = gameid self.restore_settings(gameid) + return True def tick(self, visible): (_, opened) = imgui.begin(self.BUTTON_NAME, True, imgui.WINDOW_NO_COLLAPSE) @@ -2189,8 +2193,10 @@ class UpdateTitle(ToolWindow): failed_future, ) return - # bring to the foreground in case some other title was selected - self._select_title(name) + # bring to the foreground if needed, in case some other title was selected + ret = self._select_title(name) + # we save title settings before doing a normal manual upload, follow the same pattern here + self.save_settings(f'UpdateTitle.{self.title_name}.', self.settings) self.do_upload() -- GitLab