mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06: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
2 changed files with 13 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue