Fix default hardware type NOZZLE in XML material

CURA-5716
This commit is contained in:
Lipu Fei 2018-09-11 11:19:58 +02:00
parent d9e23bf02b
commit 1fb6441327

View file

@ -269,7 +269,7 @@ class XmlMaterialProfile(InstanceContainer):
# Find all hotend sub-profiles corresponding to this material and machine and add them to this profile. # Find all hotend sub-profiles corresponding to this material and machine and add them to this profile.
buildplate_dict = {} # type: Dict[str, Any] buildplate_dict = {} # type: Dict[str, Any]
for variant_name, variant_dict in machine_variant_map[definition_id].items(): for variant_name, variant_dict in machine_variant_map[definition_id].items():
variant_type = variant_dict["variant_node"].getMetaDataEntry("hardware_type", "") variant_type = variant_dict["variant_node"].getMetaDataEntry("hardware_type", str(VariantType.NOZZLE))
variant_type = VariantType(variant_type) variant_type = VariantType(variant_type)
if variant_type == VariantType.NOZZLE: if variant_type == VariantType.NOZZLE:
# The hotend identifier is not the containers name, but its "name". # The hotend identifier is not the containers name, but its "name".