mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Fix PPA crashing on single-extruder printers
The machine manager was leading to a crash when trying to enable the second extruder in single-extrusion printers, because the check for the second extruder was not correctly implemented. This commit fixes that issue by checking if the global stack has the specified extruder. If it does not, then the function returns while logging the issue. CURA-7048
This commit is contained in:
parent
cef0ae349d
commit
a1d7eefc42
1 changed files with 2 additions and 2 deletions
|
@ -894,8 +894,8 @@ class MachineManager(QObject):
|
|||
|
||||
@pyqtSlot(int, bool)
|
||||
def setExtruderEnabled(self, position: int, enabled: bool) -> None:
|
||||
if self._global_container_stack is None:
|
||||
Logger.log("w", "Could not find extruder on position %s", position)
|
||||
if self._global_container_stack is None or 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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue