Merge pull request #19396 from Ultimaker/CURA-11940_yes_is_true_for_cura

[CURA-11940] XmlMaterial: Don't 'translate' to yes when it's a cura-setting.
This commit is contained in:
HellAholic 2024-07-26 11:20:40 +02:00 committed by GitHub
commit 80f219012e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1083,10 +1083,9 @@ class XmlMaterialProfile(InstanceContainer):
# Skip material properties (eg diameter) or metadata (eg GUID)
return
if instance.value is True:
data = "yes"
elif instance.value is False:
data = "no"
truth_map = { True: "yes", False: "no" }
if tag_name != "cura:setting" and instance.value in truth_map:
data = truth_map[instance.value]
else:
data = str(instance.value)