mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 06:33:55 -06:00
Restore both material and variant to match 1st extruder when switching to single extrusion
This commit is contained in:
parent
8d42f9c187
commit
2ca24ba7e6
2 changed files with 25 additions and 7 deletions
|
@ -505,6 +505,17 @@ class MachineManager(QObject):
|
|||
|
||||
return result
|
||||
|
||||
@pyqtProperty("QVariantList", notify = activeVariantChanged)
|
||||
def activeMaterialIds(self):
|
||||
result = []
|
||||
if ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() is not None:
|
||||
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||
variant_container = stack.findContainer({"type": "variant"})
|
||||
if variant_container and variant_container != self._empty_variant_container:
|
||||
result.append(variant_container.getId())
|
||||
|
||||
return result
|
||||
|
||||
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||
def activeMaterialNames(self):
|
||||
result = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue