Merge branch 'master' into CURA-4451_not_support_container

This commit is contained in:
ChrisTerBeke 2017-10-26 09:48:52 +02:00
commit b1a4c3488f
9 changed files with 70 additions and 29 deletions

View file

@ -14,6 +14,14 @@ Menu
property int extruderIndex: 0
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
}
UM.SettingPropertyProvider
{
@ -29,14 +37,14 @@ Menu
id: automaticMaterial
text:
{
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex)
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex && !isClusterPrinter)
{
var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex];
return catalog.i18nc("@title:menuitem %1 is the automatically selected material", "Automatic: %1").arg(materialName);
}
return "";
}
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex && !isClusterPrinter
onTriggered:
{
var materialId = Cura.MachineManager.printerOutputDevices[0].materialIds[extruderIndex];

View file

@ -14,20 +14,28 @@ Menu
property int extruderIndex: 0
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
}
MenuItem
{
id: automaticNozzle
text:
{
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex)
if(printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex && !isClusterPrinter)
{
var nozzleName = Cura.MachineManager.printerOutputDevices[0].hotendIds[extruderIndex];
return catalog.i18nc("@title:menuitem %1 is the nozzle currently loaded in the printer", "Automatic: %1").arg(nozzleName);
}
return "";
}
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex
visible: printerConnected && Cura.MachineManager.printerOutputDevices[0].hotendIds.length > extruderIndex && !isClusterPrinter
onTriggered:
{
var activeExtruderIndex = ExtruderManager.activeExtruderIndex;

View file

@ -91,8 +91,8 @@ Item {
id: saveRow
width: base.width
height: saveToButton.height
anchors.top: progressBar.bottom
anchors.topMargin: UM.Theme.getSize("sidebar_margin").height
anchors.bottom: parent.bottom
anchors.bottomMargin: UM.Theme.getSize("sidebar_margin").height
anchors.left: parent.left
Row {