Only update position of label when it's visible

This prevents unneeded re-rendering
This commit is contained in:
Jaime van Kessel 2020-01-24 14:04:27 +01:00
parent b25d6360ab
commit bd18a539e2
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -202,8 +202,9 @@ Item
// dragging a tool handle.
Rectangle
{
x: -base.x + base.mouseX + UM.Theme.getSize("default_margin").width
y: -base.y + base.mouseY + UM.Theme.getSize("default_margin").height
id: toolInfo
x: visible ? -base.x + base.mouseX + UM.Theme.getSize("default_margin").width: 0
y: visible ? -base.y + base.mouseY + UM.Theme.getSize("default_margin").height: 0
width: toolHint.width + UM.Theme.getSize("default_margin").width
height: toolHint.height;