From e1bca1ca5d2c646b057cd2d1f24c2a5d94a43f33 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 5 Feb 2018 10:57:12 +0100 Subject: [PATCH] CURA-4895 Don't run autosave settings if application has not been created or if not started --- plugins/AutoSave/AutoSave.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/AutoSave/AutoSave.py b/plugins/AutoSave/AutoSave.py index a549e6ff0a..50b66885d4 100644 --- a/plugins/AutoSave/AutoSave.py +++ b/plugins/AutoSave/AutoSave.py @@ -67,6 +67,15 @@ class AutoSave(Extension): self._global_stack.containersChanged.connect(self._triggerTimer) def _onTimeout(self): + # only initialise if the application is created and has started + from cura.CuraApplication import CuraApplication + if not CuraApplication.Created: + self._change_timer.start() + return + if not CuraApplication.getInstance().started: + self._change_timer.start() + return + self._saving = True # To prevent the save process from triggering another autosave. Logger.log("d", "Autosaving preferences, instances and profiles")