mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
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:
parent
d369f92020
commit
cf7bad1bbb
1 changed files with 2 additions and 1 deletions
|
@ -697,7 +697,8 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
builder.data(str(instance.value))
|
builder.data(str(instance.value))
|
||||||
builder.end("setting")
|
builder.end("setting")
|
||||||
|
|
||||||
def _profile_name(self, material_name, color_name):
|
@classmethod
|
||||||
|
def _profile_name(cls, material_name, color_name):
|
||||||
if color_name != "Generic":
|
if color_name != "Generic":
|
||||||
return "%s %s" % (color_name, material_name)
|
return "%s %s" % (color_name, material_name)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue