Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2022-08-31 15:13:47 +0300
committerRemco Burema <r.burema@ultimaker.com>2022-08-31 15:13:47 +0300
commit4ea437ba283e39165b9b72abb1e429641868d0e9 (patch)
tree1e3339b532ee4a630184053f058ac0625815bab8 /cura/Settings
parent4c55befad7a835d72138c2edc8a23fd3988fb462 (diff)
Make send to DF in monitor for abstract printer work (again-ish).
Already moslty implemented, but a new approach of the base feature (abstract cloud printers) made a more? elegant and functioning implementation possible. (re)implements CURA-9422
Diffstat (limited to 'cura/Settings')
-rwxr-xr-xcura/Settings/MachineManager.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py
index fc11beb2c8..d091ab9f6f 100755
--- a/cura/Settings/MachineManager.py
+++ b/cura/Settings/MachineManager.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2021 Ultimaker B.V.
+# Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import time
@@ -531,9 +531,9 @@ class MachineManager(QObject):
def printerConnected(self) -> bool:
return bool(self._printer_output_devices)
- @pyqtProperty(bool, notify = printerConnectedStatusChanged)
- def activeMachineIsAbstract(self) -> bool:
- return (self.activeMachine is not None) and parseBool(self.activeMachine.getMetaDataEntry("is_abstract_machine", False))
+ @pyqtProperty(bool, notify = globalContainerChanged)
+ def activeMachineIsAbstractCloudPrinter(self) -> bool:
+ return len(self._printer_output_devices) == 1 and self._printer_output_devices[0].__class__.__name__ == "AbstractCloudOutputDevice"
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineIsGroup(self) -> bool:
@@ -559,8 +559,6 @@ class MachineManager(QObject):
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
def activeMachineHasCloudRegistration(self) -> bool:
- if self.activeMachineIsAbstract:
- return any(m.getMetaDataEntry("is_online", False) for m in self.getMachinesWithDefinition(self.activeMachine.definition.getId(), True))
return self.activeMachine is not None and ConnectionType.CloudConnection in self.activeMachine.configuredConnectionTypes
@pyqtProperty(bool, notify = printerConnectedStatusChanged)