mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 04:19:03 +08:00
CURA-4606 refactored activeMaterialNames
This commit is contained in:
parent
c3349baf39
commit
471182333d
@ -460,15 +460,7 @@ class MachineManager(QObject):
|
||||
|
||||
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||
def activeMaterialNames(self) -> List[str]:
|
||||
result = []
|
||||
|
||||
active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks()
|
||||
if active_stacks is not None:
|
||||
for stack in active_stacks:
|
||||
material_container = stack.material
|
||||
if material_container and material_container != self._empty_material_container:
|
||||
result.append(material_container.getName())
|
||||
return result
|
||||
return list(self._current_root_material_name.values())
|
||||
|
||||
@pyqtProperty(str, notify=activeMaterialChanged)
|
||||
def activeMaterialId(self) -> str:
|
||||
|
Loading…
x
Reference in New Issue
Block a user