Fix check that finds the extruder in a position

CURA-7048
This commit is contained in:
Kostas Karmas 2019-12-17 09:43:13 +01:00 committed by Jaime van Kessel
parent a1d7eefc42
commit 50b8ff2352
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -894,7 +894,7 @@ class MachineManager(QObject):
@pyqtSlot(int, bool)
def setExtruderEnabled(self, position: int, enabled: bool) -> None:
if self._global_container_stack is None or position not in self._global_container_stack.extruders:
if self._global_container_stack is None or str(position) not in self._global_container_stack.extruders:
Logger.log("w", "Could not find extruder on position %s.", position)
return
extruder = self._global_container_stack.extruderList[position]