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. // dragging a tool handle.
Rectangle Rectangle
{ {
x: -base.x + base.mouseX + UM.Theme.getSize("default_margin").width id: toolInfo
y: -base.y + base.mouseY + UM.Theme.getSize("default_margin").height 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 width: toolHint.width + UM.Theme.getSize("default_margin").width
height: toolHint.height; height: toolHint.height;