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.)
This commit is contained in:
Remco Burema 2020-01-02 14:55:46 +01:00
parent 261ee5b7f5
commit 56cf2339f2
No known key found for this signature in database
GPG key ID: 215C49431D43F98C

View file

@ -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: