mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
WIP: Simplify global stack and extruder stack activation and fixes
This commit is contained in:
parent
21c4753443
commit
c432d4ffbb
6 changed files with 14 additions and 21 deletions
|
@ -283,6 +283,7 @@ class MachineManager(QObject):
|
|||
containers = container_registry.findContainerStacks(id = stack_id)
|
||||
if containers:
|
||||
Application.getInstance().setGlobalContainerStack(containers[0])
|
||||
ExtruderManager.getInstance()._globalContainerStackChanged()
|
||||
|
||||
self.__emitChangedSignals()
|
||||
|
||||
|
@ -877,9 +878,10 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtSlot(int, result = QObject)
|
||||
def getExtruder(self, position: int):
|
||||
extruder = None
|
||||
if self._global_container_stack:
|
||||
return self._global_container_stack.extruders.get(str(position))
|
||||
return None
|
||||
extruder = self._global_container_stack.extruders.get(str(position))
|
||||
return extruder
|
||||
|
||||
def _onMachineNameChanged(self):
|
||||
self.globalContainerChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue