mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:05:55 +08:00
No longer crash when trying to get non existing extruder stacks
CURA-3953
This commit is contained in:
parent
572852d2d6
commit
7813bfc543
@ -78,8 +78,9 @@ class ExtruderManager(QObject):
|
|||||||
def extruderIds(self):
|
def extruderIds(self):
|
||||||
map = {}
|
map = {}
|
||||||
global_stack_id = Application.getInstance().getGlobalContainerStack().getId()
|
global_stack_id = Application.getInstance().getGlobalContainerStack().getId()
|
||||||
for position in self._extruder_trains[global_stack_id]:
|
if global_stack_id in self._extruder_trains:
|
||||||
map[position] = self._extruder_trains[global_stack_id][position].getId()
|
for position in self._extruder_trains[global_stack_id]:
|
||||||
|
map[position] = self._extruder_trains[global_stack_id][position].getId()
|
||||||
return map
|
return map
|
||||||
|
|
||||||
@pyqtSlot(str, result = str)
|
@pyqtSlot(str, result = str)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user