mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:36:01 +08: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
@ -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…
x
Reference in New Issue
Block a user