Skip to content

Commit

Permalink
Merge pull request #19396 from Ultimaker/CURA-11940_yes_is_true_for_cura
Browse files Browse the repository at this point in the history
[CURA-11940] XmlMaterial: Don't 'translate' to yes when it's a cura-setting.
  • Loading branch information
HellAholic committed Jul 26, 2024
2 parents e02c8b8 + 2e00ef9 commit 80f2190
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugins/XmlMaterialProfile/XmlMaterialProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,10 +1083,9 @@ def _addSettingElement(self, builder, instance):
# 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)

Expand Down

0 comments on commit 80f2190

Please sign in to comment.