mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 07:53:15 +08:00
Fixed issue with first startup
This commit is contained in:
parent
8fdc0a40ce
commit
0229fd8676
@ -490,10 +490,11 @@ class MachineManager(QObject):
|
||||
@pyqtProperty("QVariantList", notify = activeMaterialChanged)
|
||||
def activeMaterialNames(self):
|
||||
result = []
|
||||
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||
material_container = stack.findContainer(type="material")
|
||||
if material_container and material_container != self._empty_material_container:
|
||||
result.append(material_container.getName())
|
||||
if ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() is not None:
|
||||
for stack in ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks():
|
||||
material_container = stack.findContainer(type="material")
|
||||
if material_container and material_container != self._empty_material_container:
|
||||
result.append(material_container.getName())
|
||||
return result
|
||||
|
||||
@pyqtProperty(str, notify=activeMaterialChanged)
|
||||
|
Loading…
x
Reference in New Issue
Block a user