From bebcd78db04fcd5cfee37d581d5ff804d4d09f90 Mon Sep 17 00:00:00 2001 From: Ruben D Date: Sun, 4 Feb 2018 01:13:34 +0100 Subject: [PATCH] Reset the selected script index upon changing printers So that you're not getting into a state of viewing an invalid index. If you switch to a printer with 0 scripts attached, the index is still invalid, but it won't display anything then so you're okay. --- plugins/PostProcessingPlugin/PostProcessingPlugin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/PostProcessingPlugin/PostProcessingPlugin.py b/plugins/PostProcessingPlugin/PostProcessingPlugin.py index 770169f210..7f53ab4672 100644 --- a/plugins/PostProcessingPlugin/PostProcessingPlugin.py +++ b/plugins/PostProcessingPlugin/PostProcessingPlugin.py @@ -216,6 +216,7 @@ class PostProcessingPlugin(QObject, Extension): new_script._instance.setProperty(setting_key, "value", setting_value) self._script_list.append(new_script) + self.setSelectedScriptIndex(0) self.scriptListChanged.emit() def _writeScriptsToStack(self):