Merge remote-tracking branch 'upstream/CURA-4057'

This commit is contained in:
Lipu Fei 2017-07-21 14:14:27 +02:00
commit 3d378ebc5f
3 changed files with 67 additions and 3 deletions

View file

@ -20,6 +20,7 @@ Rectangle
// Is there an output device for this printer?
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
property bool printerAcceptsCommands: printerConnected && Cura.MachineManager.printerOutputDevices[0].acceptsCommands
property var connectedPrinter: Cura.MachineManager.printerOutputDevices.length >= 1 ? Cura.MachineManager.printerOutputDevices[0] : null
property int backendState: UM.Backend.state;
property bool monitoringPrint: false
@ -344,12 +345,48 @@ Rectangle
Loader
{
id: controlItem
anchors.bottom: footerSeparator.top
anchors.top: headerSeparator.bottom
anchors.left: base.left
anchors.right: base.right
source: monitoringPrint ? "PrintMonitor.qml": "SidebarContents.qml"
}
sourceComponent:
{
if(monitoringPrint && connectedPrinter != null)
{
if(connectedPrinter.controlItem != null)
{
return connectedPrinter.controlItem
}
}
return null
}
}
Loader
{
anchors.bottom: footerSeparator.top
anchors.top: headerSeparator.bottom
anchors.left: base.left
anchors.right: base.right
source:
{
if(controlItem.sourceComponent == null)
{
if(monitoringPrint)
{
return "PrintMonitor.qml"
} else
{
return "SidebarContents.qml"
}
}
else
{
return ""
}
}
}
Rectangle
{