CURA-4341 use existing signals instead to update topbar monitoring

This commit is contained in:
ChrisTerBeke 2017-09-22 13:40:55 +02:00
parent ce390b50e7
commit 07161f5d50
2 changed files with 15 additions and 23 deletions

View file

@ -23,17 +23,10 @@ UM.MainWindow
Connections
{
target: Printer
onShowPrintMonitor:
{
topbar.monitoringChanged(show)
if (show)
{
onShowPrintMonitor: {
if (show) {
topbar.startMonitoringPrint()
}
else
{
} else {
topbar.stopMonitoringPrint()
}
}
@ -352,17 +345,13 @@ UM.MainWindow
}
}
function isMonitoringPrint () {
return base.showPrintMonitor
}
Topbar
{
id: topbar
anchors.left:parent.left
anchors.right: parent.right
anchors.top: parent.top
monitoringPrint: isMonitoringPrint()
monitoringPrint: base.showPrintMonitor
onStartMonitoringPrint: base.showPrintMonitor = true
onStopMonitoringPrint: base.showPrintMonitor = false
}