Only add variants that fit on my machine

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-06 15:15:02 +02:00
parent bc3300baa8
commit 3ef0b4292d
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -41,5 +41,9 @@ class MachineNode(ContainerNode):
name = container.getMetaDataEntry("name") name = container.getMetaDataEntry("name")
if name in self.variants: if name in self.variants:
return # Already have this one. return # Already have this one.
if container.getMetaDataEntry("hardware_type") != "nozzle":
return # Only want nozzles in my tree.
if container.getMetaDataEntry("definition") != self.container_id:
return # Not a nozzle that fits in my machine.
self.variants[name] = VariantNode(container.getId(), parent = self) self.variants[name] = VariantNode(container.getId(), parent = self)