mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 04:29:00 +08:00
Fix iterating over 'hardware compatible' keys
This is both faster and actually functions properly. Contributes to issue CURA-6272.
This commit is contained in:
parent
a7f9fc5f6b
commit
943503cac7
@ -945,9 +945,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
|
||||
for machine in data.iterfind("./um:settings/um:machine", cls.__namespaces):
|
||||
machine_compatibility = common_compatibility
|
||||
for entry in machine.iterfind("./um:setting", cls.__namespaces):
|
||||
key = entry.get("key")
|
||||
if key == "hardware compatible":
|
||||
for entry in machine.iterfind("./um:setting[@key='hardware compatible']", cls.__namespaces):
|
||||
if entry.text is not None:
|
||||
machine_compatibility = cls._parseCompatibleValue(entry.text)
|
||||
|
||||
@ -1020,9 +1018,7 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
continue
|
||||
|
||||
hotend_compatibility = machine_compatibility
|
||||
for entry in hotend.iterfind("./um:setting", cls.__namespaces):
|
||||
key = entry.get("key")
|
||||
if key == "hardware compatible":
|
||||
for entry in hotend.iterfind("./um:setting[@key='hardware compatible']", cls.__namespaces):
|
||||
if entry.text is not None:
|
||||
hotend_compatibility = cls._parseCompatibleValue(entry.text)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user