From cf7bad1bbb4c5984ff0a404dc9e525ea70f1e492 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 2 Nov 2017 10:18:52 +0100 Subject: [PATCH] Make _profile_name a class method This way we can execute it statically while getting the metadata. Contributes to issue CURA-4243. --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 506670d5ee..cb93d51b63 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -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: