mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -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 ""
|
||||
|
||||
@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)
|
||||
def allActiveMaterialIds(self):
|
||||
if not self._global_container_stack:
|
||||
|
|
|
@ -153,7 +153,7 @@ class MachineSettingsAction(MachineAction):
|
|||
if machine_manager.hasMaterials:
|
||||
extruder_material_id = machine_manager.allActiveMaterialIds[extruder_manager.extruderIds["0"]]
|
||||
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
|
||||
extruder_stacks = ExtruderManager.getInstance().getActiveExtruderStacks()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue