diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2019-10-22 12:37:33 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2019-10-22 12:38:32 +0300 |
commit | fc0b8185b7df0f223a67f24384e3e6bad663c8a1 (patch) | |
tree | e0fa3574dcd97e812a8e3c78b38480e7728fd859 /plugins/XmlMaterialProfile/XmlMaterialProfile.py | |
parent | 985aac9e601337d310b5a9c3e9160ed39852104e (diff) |
Fix setMetaDataEntry() dependency on ContainerRegistery
CURA-6920
Diffstat (limited to 'plugins/XmlMaterialProfile/XmlMaterialProfile.py')
-rw-r--r-- | plugins/XmlMaterialProfile/XmlMaterialProfile.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index fe0f73f2b3..093638d594 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -76,7 +76,9 @@ class XmlMaterialProfile(InstanceContainer): new_setting_values_dict[self.__material_properties_setting_map[k]] = v if not apply_to_all: # Historical: If you only want to modify THIS container. We only used that to prevent recursion but with the below code that's no longer necessary. - container_query = registry.findContainers(id = self.getId()) + # CURA-6920: This is an optimization, but it also fixes the problem that you can only set metadata for a + # material container that can be found in the container registry. + container_query = [self] else: container_query = registry.findContainers(base_file = self.getMetaDataEntry("base_file")) |