mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 05:23:58 -06:00
Merge pull request #2677 from fieldOfView/fix_isclusterprinter
Fix qml error when there is no connected printer
This commit is contained in:
commit
9488d543de
3 changed files with 33 additions and 15 deletions
|
@ -119,11 +119,17 @@ Item
|
|||
onClicked: manager.loadConfigurationFromPrinter()
|
||||
|
||||
function isClusterPrinter() {
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||
// This is a non cluster printer or the cluster it is just one printer
|
||||
if (clusterSize == undefined || clusterSize == 1)
|
||||
return false
|
||||
return true
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize;
|
||||
// This is not a cluster printer or the cluster it is just one printer
|
||||
if(clusterSize == undefined || clusterSize == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,17 @@ Menu
|
|||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property bool isClusterPrinter:
|
||||
{
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||
// This is a non cluster printer or the cluster it is just one printer
|
||||
if (clusterSize == undefined || clusterSize == 1)
|
||||
return false
|
||||
return true
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize;
|
||||
// This is not a cluster printer or the cluster it is just one printer
|
||||
if(clusterSize == undefined || clusterSize == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
UM.SettingPropertyProvider
|
||||
|
|
|
@ -16,11 +16,17 @@ Menu
|
|||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property bool isClusterPrinter:
|
||||
{
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize
|
||||
// This is a non cluster printer or the cluster it is just one printer
|
||||
if (clusterSize == undefined || clusterSize == 1)
|
||||
return false
|
||||
return true
|
||||
if(Cura.MachineManager.printerOutputDevices.length == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var clusterSize = Cura.MachineManager.printerOutputDevices[0].clusterSize;
|
||||
// This is not a cluster printer or the cluster it is just one printer
|
||||
if(clusterSize == undefined || clusterSize == 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
MenuItem
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue