|
@@ -11,6 +11,7 @@ import xml.etree.ElementTree as ET
|
|
|
from UM.PluginRegistry import PluginRegistry
|
|
|
from UM.Resources import Resources
|
|
|
from UM.Logger import Logger
|
|
|
+from UM.Decorators import CachedMemberFunctions
|
|
|
import UM.Dictionary
|
|
|
from UM.Settings.InstanceContainer import InstanceContainer
|
|
|
from UM.Settings.ContainerRegistry import ContainerRegistry
|
|
@@ -71,6 +72,8 @@ class XmlMaterialProfile(InstanceContainer):
|
|
|
Logger.log("w", "Can't change metadata {key} of material {material_id} because it's read-only.".format(key = key, material_id = self.getId()))
|
|
|
return
|
|
|
|
|
|
+ CachedMemberFunctions.clearInstanceCache(self)
|
|
|
+
|
|
|
# Some metadata such as diameter should also be instantiated to be a setting. Go though all values for the
|
|
|
# "properties" field and apply the new values to SettingInstances as well.
|
|
|
new_setting_values_dict = {}
|
|
@@ -480,6 +483,7 @@ class XmlMaterialProfile(InstanceContainer):
|
|
|
first.append(element)
|
|
|
|
|
|
def clearData(self):
|
|
|
+ CachedMemberFunctions.clearInstanceCache(self)
|
|
|
self._metadata = {
|
|
|
"id": self.getId(),
|
|
|
"name": ""
|
|
@@ -519,6 +523,8 @@ class XmlMaterialProfile(InstanceContainer):
|
|
|
def deserialize(self, serialized, file_name = None):
|
|
|
"""Overridden from InstanceContainer"""
|
|
|
|
|
|
+ CachedMemberFunctions.clearInstanceCache(self)
|
|
|
+
|
|
|
containers_to_add = []
|
|
|
# update the serialized data first
|
|
|
from UM.Settings.Interfaces import ContainerInterface
|