mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 12:09:00 +08:00
Display an appropriate tooltip when device is removed from the account
The tooltip is updated to reflect the case where a cloud printer is removed from the users account. CURA-7438
This commit is contained in:
parent
ee7f2d4b38
commit
4bebaaaddb
@ -490,6 +490,11 @@ class MachineManager(QObject):
|
|||||||
def activeMachineIsGroup(self) -> bool:
|
def activeMachineIsGroup(self) -> bool:
|
||||||
return bool(self._printer_output_devices) and len(self._printer_output_devices[0].printers) > 1
|
return bool(self._printer_output_devices) and len(self._printer_output_devices[0].printers) > 1
|
||||||
|
|
||||||
|
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||||
|
def activeMachineIsLinkedToCurrentAccount(self) -> bool:
|
||||||
|
from plugins.UM3NetworkPrinting.src.Cloud.CloudOutputDeviceManager import META_REMOVED_FROM_ACCOUNT
|
||||||
|
return not self.activeMachine.getMetaDataEntry(META_REMOVED_FROM_ACCOUNT, False)
|
||||||
|
|
||||||
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
@pyqtProperty(bool, notify = printerConnectedStatusChanged)
|
||||||
def activeMachineHasNetworkConnection(self) -> bool:
|
def activeMachineHasNetworkConnection(self) -> bool:
|
||||||
# A network connection is only available if any output device is actually a network connected device.
|
# A network connection is only available if any output device is actually a network connected device.
|
||||||
|
@ -42,7 +42,14 @@ Cura.ExpandablePopup
|
|||||||
{
|
{
|
||||||
if (Cura.API.account.isLoggedIn)
|
if (Cura.API.account.isLoggedIn)
|
||||||
{
|
{
|
||||||
return catalog.i18nc("@status", "The cloud printer is offline. Please check if the printer is turned on and connected to the internet.")
|
if (Cura.MachineManager.activeMachineIsLinkedToCurrentAccount)
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@status", "The cloud printer is offline. Please check if the printer is turned on and connected to the internet.")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return catalog.i18nc("@status", "This printer is not linked to your account. Please visit the Ultimaker Digital Factory to establish a connection.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user