Use extruderList rather than deprecated extruders

Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
This commit is contained in:
Ghostkeeper 2020-05-15 15:50:03 +02:00
parent a6d7b97abc
commit 174a8e5411
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -915,7 +915,7 @@ class MachineManager(QObject):
@pyqtSlot(int, bool) @pyqtSlot(int, bool)
def setExtruderEnabled(self, position: int, enabled: bool) -> None: def setExtruderEnabled(self, position: int, enabled: bool) -> None:
if self._global_container_stack is None or str(position) not in self._global_container_stack.extruders: if self._global_container_stack is None or position >= len(self._global_container_stack.extruderList):
Logger.log("w", "Could not find extruder on position %s.", position) Logger.log("w", "Could not find extruder on position %s.", position)
return return
extruder = self._global_container_stack.extruderList[position] extruder = self._global_container_stack.extruderList[position]
@ -1590,7 +1590,7 @@ class MachineManager(QObject):
return return
with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue): with postponeSignals(*self._getContainerChangedSignals(), compress = CompressTechnique.CompressPerParameterValue):
self._setQualityGroup(self.activeQualityGroup()) self._setQualityGroup(self.activeQualityGroup())
for stack in [self._global_container_stack] + list(self._global_container_stack.extruders.values()): for stack in [self._global_container_stack] + self._global_container_stack.extruderList:
stack.userChanges.clear() stack.userChanges.clear()
@pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged) @pyqtProperty(QObject, fset = setQualityChangesGroup, notify = activeQualityChangesGroupChanged)