mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
CURA-4870 Replace network key and connect group name metadata values
when the connection changes.
This commit is contained in:
parent
260cad36cb
commit
ebbb30a5be
2 changed files with 12 additions and 2 deletions
|
@ -1115,6 +1115,13 @@ class MachineManager(QObject):
|
|||
self._global_container_stack.variant = self._empty_variant_container
|
||||
self._updateQualityWithMaterial()
|
||||
|
||||
## Find all container stacks that has the pair 'key = value' in its metadata and replaces the value with 'new_value'
|
||||
def replaceContainersMetadata(self, key: str, value: str, new_value: str):
|
||||
machines = ContainerRegistry.getInstance().findContainerStacks(type = "machine")
|
||||
for machine in machines:
|
||||
if machine.getMetaDataEntry(key) == value:
|
||||
machine.setMetaDataEntry(key, new_value)
|
||||
|
||||
@pyqtSlot("QVariant")
|
||||
def setGlobalVariant(self, container_node):
|
||||
self.blurSettings.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue