mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Fix setting number of extruders when hasVariants is set
This commit is contained in:
parent
a3d92d557d
commit
98b127851b
2 changed files with 17 additions and 1 deletions
|
@ -525,6 +525,22 @@ class MachineManager(QObject):
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
@pyqtProperty("QVariantMap", notify = activeVariantChanged)
|
||||||
|
def allActiveVariantIds(self):
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return {}
|
||||||
|
|
||||||
|
result = {}
|
||||||
|
|
||||||
|
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||||
|
variant_container = stack.variant
|
||||||
|
if not variant_container:
|
||||||
|
continue
|
||||||
|
|
||||||
|
result[stack.getId()] = variant_container.getId()
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
@pyqtProperty("QVariantMap", notify = activeMaterialChanged)
|
||||||
def allActiveMaterialIds(self):
|
def allActiveMaterialIds(self):
|
||||||
if not self._global_container_stack:
|
if not self._global_container_stack:
|
||||||
|
|
|
@ -153,7 +153,7 @@ class MachineSettingsAction(MachineAction):
|
||||||
if machine_manager.hasMaterials:
|
if machine_manager.hasMaterials:
|
||||||
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
||||||
if machine_manager.hasVariants:
|
if machine_manager.hasVariants:
|
||||||
extruder_variant_id = machine_manager.activeVariantIds[0]
|
extruder_variant_id = machine_manager.allActiveVariantIds[extruder_manager.extruderIds["0"]]
|
||||||
|
|
||||||
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
# Copy any settable_per_extruder setting value from the extruders to the global stack
|
||||||
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue