From 56cf2339f2db884d2c74d0c370e60fca9b402f55 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 2 Jan 2020 14:55:46 +0100 Subject: [PATCH] First initialize error checking. Change the order of initialization, so the MachineErrorChecker already has its signals attached when the first machine gets loaded. The increased number of 'processEvents'-calls exposed this oversight by allowing it to run out of order. (MachineErrorChecker initializes the has-errors field to True if no check has been done yet.) --- cura/CuraApplication.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index d51685ac29..63046a5cb6 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -753,6 +753,11 @@ class CuraApplication(QtApplication): def run(self): super().run() + Logger.log("i", "Initializing machine error checker") + self._machine_error_checker = MachineErrorChecker(self) + self._machine_error_checker.initialize() + self.processEvents() + Logger.log("i", "Initializing machine manager") self._setLoadingHint(self._i18n_catalog.i18nc("@info:progress", "Initializing machine manager...")) self._machine_manager = MachineManager(self, parent = self) @@ -762,11 +767,6 @@ class CuraApplication(QtApplication): self._container_manager = ContainerManager(self) self.processEvents() - Logger.log("i", "Initializing machine error checker") - self._machine_error_checker = MachineErrorChecker(self) - self._machine_error_checker.initialize() - self.processEvents() - # Check if we should run as single instance or not. If so, set up a local socket server which listener which # coordinates multiple Cura instances and accepts commands. if self._use_single_instance: