mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 05:39:37 +08:00
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:
parent
91ab53e49c
commit
bebcd78db0
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user