mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 21:27:50 -06:00
CURA-4870 Don't allow to connect more than one instance to the same
group.
This commit is contained in:
parent
222a18e698
commit
99d653cea5
3 changed files with 36 additions and 4 deletions
|
@ -1220,6 +1220,14 @@ class MachineManager(QObject):
|
|||
for container in hidden_containers:
|
||||
container.setMetaDataEntry("connect_group_name", group_name)
|
||||
|
||||
## This method checks if there is an instance connected to the given network_key
|
||||
def existNetworkInstances(self, network_key: str) -> bool:
|
||||
metadata_filter = {"um_network_key": network_key}
|
||||
containers = ContainerRegistry.getInstance().findContainerStacks(type = "machine", **metadata_filter)
|
||||
if containers:
|
||||
return True
|
||||
return False
|
||||
|
||||
@pyqtSlot("QVariant")
|
||||
def setGlobalVariant(self, container_node):
|
||||
self.blurSettings.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue