mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 23:16:06 +08:00
Merge branch 'master' of github.com:Ultimaker/Cura
This commit is contained in:
commit
8a8dd20c00
@ -38,13 +38,16 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer):
|
|||||||
def setMetaDataEntry(self, key, value):
|
def setMetaDataEntry(self, key, value):
|
||||||
if self.isReadOnly():
|
if self.isReadOnly():
|
||||||
return
|
return
|
||||||
|
if self.getMetaDataEntry(key, None) == value:
|
||||||
|
# Prevent loop caused by for loop.
|
||||||
|
return
|
||||||
|
|
||||||
super().setMetaDataEntry(key, value)
|
super().setMetaDataEntry(key, value)
|
||||||
|
|
||||||
basefile = self.getMetaDataEntry("base_file", self._id) #if basefile is self.id, this is a basefile.
|
basefile = self.getMetaDataEntry("base_file", self._id) #if basefile is self.id, this is a basefile.
|
||||||
# Update all containers that share GUID and basefile
|
# Update all containers that share GUID and basefile
|
||||||
for container in UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile):
|
for container in UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile):
|
||||||
container.setMetaData(copy.deepcopy(self._metadata))
|
container.setMetaDataEntry(key, value)
|
||||||
|
|
||||||
## Overridden from InstanceContainer, similar to setMetaDataEntry.
|
## Overridden from InstanceContainer, similar to setMetaDataEntry.
|
||||||
# without this function the setName would only set the name of the specific nozzle / material / machine combination container
|
# without this function the setName would only set the name of the specific nozzle / material / machine combination container
|
||||||
|
Loading…
x
Reference in New Issue
Block a user