mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Added label property to XML profile (as per 1.2 spec)
CURA-1968
This commit is contained in:
parent
aa28ecca37
commit
a904067d7a
2 changed files with 10 additions and 2 deletions
|
@ -117,6 +117,10 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||
builder.data(metadata.pop("color_name", ""))
|
||||
builder.end("color")
|
||||
|
||||
builder.start("label")
|
||||
builder.data(self._name)
|
||||
builder.end("label")
|
||||
|
||||
builder.end("name")
|
||||
## End Name Block
|
||||
|
||||
|
@ -235,7 +239,11 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||
brand = entry.find("./um:brand", self.__namespaces)
|
||||
material = entry.find("./um:material", self.__namespaces)
|
||||
color = entry.find("./um:color", self.__namespaces)
|
||||
label = entry.find("./um:label", self.__namespaces)
|
||||
|
||||
if label:
|
||||
self.setName(label.text)
|
||||
else:
|
||||
self.setName(self._profile_name(material.text, color.text))
|
||||
|
||||
self.addMetaDataEntry("brand", brand.text)
|
||||
|
|
|
@ -282,7 +282,6 @@ UM.ManagementPage
|
|||
{
|
||||
return
|
||||
}
|
||||
|
||||
materialProperties.name = currentItem.name;
|
||||
|
||||
if(currentItem.metadata != undefined && currentItem.metadata != null)
|
||||
|
@ -305,6 +304,7 @@ UM.ManagementPage
|
|||
materialProperties.density = 0.0;
|
||||
materialProperties.diameter = 0.0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue