From 0b8678d2ae29cb58b3f16a6df7efd4fe2cf28138 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 26 Feb 2018 19:33:16 +0100 Subject: [PATCH] Explicitly create MachineManager --- cura/CuraApplication.py | 4 ++-- cura/Settings/MachineManager.py | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 3cb78c01b2..eb09f1ed82 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -750,7 +750,7 @@ class CuraApplication(QtApplication): self._quality_manager = QualityManager(container_registry, parent = self) self._quality_manager.initialize() - self.getMachineManager() # ensure creation of machine manager + self._machine_manager = MachineManager(self) # Check if we should run as single instance or not self._setUpSingleInstanceServer() @@ -845,7 +845,7 @@ class CuraApplication(QtApplication): def getMachineManager(self, *args) -> MachineManager: if self._machine_manager is None: - self._machine_manager = MachineManager.createMachineManager() + self._machine_manager = MachineManager(self) return self._machine_manager def getExtruderManager(self, *args): diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 6569fa5cb2..b75f805d73 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -760,10 +760,6 @@ class MachineManager(QObject): # Signal that the global stack has changed Application.getInstance().globalContainerStackChanged.emit() - @staticmethod - def createMachineManager(): - return MachineManager() - @pyqtSlot(int, result = QObject) def getExtruder(self, position: int): extruder = None