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.
This commit is contained in:
Ruben D 2018-02-04 01:13:34 +01:00
parent 91ab53e49c
commit bebcd78db0
No known key found for this signature in database
GPG Key ID: 6B42C9465E304A62

View File

@ -216,6 +216,7 @@ class PostProcessingPlugin(QObject, Extension):
new_script._instance.setProperty(setting_key, "value", setting_value) new_script._instance.setProperty(setting_key, "value", setting_value)
self._script_list.append(new_script) self._script_list.append(new_script)
self.setSelectedScriptIndex(0)
self.scriptListChanged.emit() self.scriptListChanged.emit()
def _writeScriptsToStack(self): def _writeScriptsToStack(self):