Make _profile_name a class method

This way we can execute it statically while getting the metadata.

Contributes to issue CURA-4243.
This commit is contained in:
Ghostkeeper 2017-11-02 10:18:52 +01:00
parent d369f92020
commit cf7bad1bbb
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -697,7 +697,8 @@ class XmlMaterialProfile(InstanceContainer):
builder.data(str(instance.value))
builder.end("setting")
def _profile_name(self, material_name, color_name):
@classmethod
def _profile_name(cls, material_name, color_name):
if color_name != "Generic":
return "%s %s" % (color_name, material_name)
else: