mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:26:05 +08:00
Explicitly create MachineManager
This commit is contained in:
parent
12c51f4066
commit
0b8678d2ae
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user