diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index 5afa8f0346..47359a5e97 100644 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -47,9 +47,12 @@ class ExtruderManager(QObject): return 0 # No active machine, so no extruders. return len(self._extruder_trains[UM.Application.getInstance().getGlobalContainerStack().getId()]) - @pyqtProperty("QVariantList", notify=extrudersChanged) + @pyqtProperty("QVariantMap", notify=extrudersChanged) def extruderIds(self): - return [self._extruder_trains[UM.Application.getInstance().getGlobalContainerStack().getId()][extruder].getId() for extruder in self._extruder_trains[UM.Application.getInstance().getGlobalContainerStack().getId()]] + map = {} + for position in self._extruder_trains[UM.Application.getInstance().getGlobalContainerStack().getId()]: + map[position] = self._extruder_trains[UM.Application.getInstance().getGlobalContainerStack().getId()][position].getId() + return map ## The instance of the singleton pattern. # diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 9f7a74be1d..cef5f86b33 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -111,7 +111,7 @@ ScrollView return Cura.MachineManager.activeMachineId } } - return ExtruderManager.extruderIds[inheritStackProvider.properties.global_inherits_stack] + return ExtruderManager.extruderIds[String(inheritStackProvider.properties.global_inherits_stack)] } }