After switching the Monitor Tab set Null to active output printer

CURA-5612
This commit is contained in:
Aleksei S 2018-08-03 11:42:55 +02:00
parent aadbebd457
commit 9c8ac6e9ed
2 changed files with 17 additions and 4 deletions

View file

@ -9,6 +9,7 @@ Component
{
Rectangle
{
id: rectangle
width: maximumWidth
height: maximumHeight
color: UM.Theme.getColor("viewport_background")
@ -103,5 +104,15 @@ Component
visible: OutputDevice.activePrinter != null
anchors.fill:parent
}
onVisibleChanged:
{
if(rectangle != null && !rectangle.visible)
{
// After switching the Tab ensure that active printer is Null, the video stream image
// might be active
OutputDevice.setActivePrinter(null)
}
}
}
}