mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Emit materialsChanged from the variant when a material gets added
This allows the material models to update themselves. Contributes to issue CURA-6600.
This commit is contained in:
parent
21412986d3
commit
f5ca29c7aa
2 changed files with 3 additions and 3 deletions
|
@ -96,7 +96,7 @@ class BaseMaterialsModel(ListModel):
|
|||
self._update()
|
||||
self.enabledChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, fset=setEnabled, notify=enabledChanged)
|
||||
@pyqtProperty(bool, fset = setEnabled, notify = enabledChanged)
|
||||
def enabled(self):
|
||||
return self._enabled
|
||||
|
||||
|
@ -169,4 +169,3 @@ class BaseMaterialsModel(ListModel):
|
|||
"is_favorite": root_material_id in self._favorite_ids
|
||||
}
|
||||
return item
|
||||
|
||||
|
|
|
@ -128,3 +128,4 @@ class VariantNode(ContainerNode):
|
|||
del self.materials["empty_material"]
|
||||
self.materials[base_file] = MaterialNode(container.getId(), variant = self)
|
||||
self.materials[base_file].materialChanged.connect(self.materialsChanged)
|
||||
self.materialsChanged.emit(self.materials[base_file])
|
Loading…
Add table
Add a link
Reference in a new issue