mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Merge pull request #7873 from Ultimaker/CURA-7438_Show_cloud_connection_not_available_printer_removed_from_account
CURA-7438 Handle the case when a cloud printer is removed from the account
This commit is contained in:
commit
feeeb972f7
10 changed files with 137 additions and 30 deletions
|
@ -22,6 +22,7 @@ from UM.Settings.SettingFunction import SettingFunction
|
|||
from UM.Signal import postponeSignals, CompressTechnique
|
||||
|
||||
import cura.CuraApplication # Imported like this to prevent circular references.
|
||||
from UM.Util import parseBool
|
||||
|
||||
from cura.Machines.ContainerNode import ContainerNode
|
||||
from cura.Machines.ContainerTree import ContainerTree
|
||||
|
@ -37,6 +38,7 @@ from cura.Settings.ExtruderStack import ExtruderStack
|
|||
from cura.Settings.cura_empty_instance_containers import (empty_definition_changes_container, empty_variant_container,
|
||||
empty_material_container, empty_quality_container,
|
||||
empty_quality_changes_container, empty_intent_container)
|
||||
from cura.UltimakerCloud.UltimakerCloudConstants import META_UM_LINKED_TO_ACCOUNT
|
||||
|
||||
from .CuraStackBuilder import CuraStackBuilder
|
||||
|
||||
|
@ -494,6 +496,10 @@ class MachineManager(QObject):
|
|||
group_size = int(self.activeMachine.getMetaDataEntry("group_size", "-1"))
|
||||
return group_size > 1
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineIsLinkedToCurrentAccount(self) -> bool:
|
||||
return parseBool(self.activeMachine.getMetaDataEntry(META_UM_LINKED_TO_ACCOUNT, "True"))
|
||||
|
||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||
def activeMachineHasNetworkConnection(self) -> bool:
|
||||
# A network connection is only available if any output device is actually a network connected device.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue