mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Force reloading the VariantNode if it exists
When the MachineNode is updated through _loadAll, it was not updating its VariantNodes when they already existed. This caused an issue to UM2+Olsson block printers, where changing the G-Code flavor to Marlin was not updating the VariantNodes to search for materials (since the variants already existed). This commit fixes that by forcing an update to the existing Variant nodes. CURA-7354
This commit is contained in:
parent
29b0bd1b23
commit
ad6f837f44
1 changed files with 4 additions and 0 deletions
|
@ -171,6 +171,10 @@ class MachineNode(ContainerNode):
|
|||
if variant_name not in self.variants:
|
||||
self.variants[variant_name] = VariantNode(variant["id"], machine = self)
|
||||
self.variants[variant_name].materialsChanged.connect(self.materialsChanged)
|
||||
else:
|
||||
# Force reloading the materials if the variant already exists or else materals won't be loaded
|
||||
# when the G-Code flavor changes --> CURA-7354
|
||||
self.variants[variant_name]._loadAll()
|
||||
if not self.variants:
|
||||
self.variants["empty"] = VariantNode("empty_variant", machine = self)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue