mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-02 00:34:26 +08:00
Fix connection type not always being seen correctly
CURA-6011
This commit is contained in:
parent
fd9b29fee2
commit
1277fbabc5
@ -54,9 +54,8 @@ class GlobalStacksModel(ListModel):
|
||||
container_stacks = ContainerRegistry.getInstance().findContainerStacks(type = "machine")
|
||||
|
||||
for container_stack in container_stacks:
|
||||
connection_type = container_stack.getMetaDataEntry("connection_type")
|
||||
connection_type = int(container_stack.getMetaDataEntry("connection_type", "-1"))
|
||||
has_remote_connection = connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]
|
||||
|
||||
if container_stack.getMetaDataEntry("hidden", False) in ["True", True]:
|
||||
continue
|
||||
|
||||
|
@ -527,7 +527,7 @@ class MachineManager(QObject):
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasRemoteConnection(self) -> bool:
|
||||
if self._global_container_stack:
|
||||
connection_type = self._global_container_stack.getMetaDataEntry("connection_type")
|
||||
connection_type = int(self._global_container_stack.getMetaDataEntry("connection_type", "-1"))
|
||||
return connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]
|
||||
return False
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user