Merge branch '4.0'

Conflicts:
	cura/GlobalStacksModel.py -> CuraContainerRegistry being used in stead of ContainerRegistry, but imports were reordered.
	plugins/CuraDrive/src/DrivePluginExtension.py -> Typing being solved in two ways.
This commit is contained in:
Ghostkeeper 2019-01-28 16:45:45 +01:00
commit 232498980c
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
7 changed files with 85 additions and 40 deletions

View file

@ -521,8 +521,12 @@ class MachineManager(QObject):
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineHasRemoteConnection(self) -> bool:
if self._global_container_stack:
connection_type = int(self._global_container_stack.getMetaDataEntry("connection_type", ConnectionType.NotConnected.value))
return connection_type in [ConnectionType.NetworkConnection.value, ConnectionType.CloudConnection.value]
has_remote_connection = False
for connection_type in self._global_container_stack.configuredConnectionTypes:
has_remote_connection |= connection_type in [ConnectionType.NetworkConnection.value,
ConnectionType.CloudConnection.value]
return has_remote_connection
return False
@pyqtProperty(bool, notify = printerConnectedStatusChanged)