Don't show context menu button if it is empty

It will likely be empty for guest accounts on networks where the administrator is the only one with rights to access other people's prints.

Contributes to issue CURA-9220.
This commit is contained in:
Ghostkeeper 2022-07-26 16:36:38 +02:00
parent 5eb340e3f0
commit e9f9730364
No known key found for this signature in database
GPG key ID: FFBC62A75981ED70
3 changed files with 104 additions and 82 deletions

View file

@ -206,7 +206,11 @@ Item
onClicked: enabled ? contextMenu.switchPopupState() : {}
visible:
{
if (!printJob)
if(!printJob)
{
return false;
}
if(!contextMenu.hasItems)
{
return false;
}