mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:16:01 +08:00
Minor code refactoring in ExtruderManager
CURA-3756
This commit is contained in:
parent
012be3c6c7
commit
3b3d9c4dae
@ -77,8 +77,9 @@ class ExtruderManager(QObject):
|
|||||||
@pyqtProperty("QVariantMap", notify=extrudersChanged)
|
@pyqtProperty("QVariantMap", notify=extrudersChanged)
|
||||||
def extruderIds(self):
|
def extruderIds(self):
|
||||||
map = {}
|
map = {}
|
||||||
for position in self._extruder_trains[Application.getInstance().getGlobalContainerStack().getId()]:
|
global_stack_id = Application.getInstance().getGlobalContainerStack().getId()
|
||||||
map[position] = self._extruder_trains[Application.getInstance().getGlobalContainerStack().getId()][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