diff options
author | Jaime van Kessel <nallath@gmail.com> | 2020-01-24 16:04:27 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2020-01-24 16:04:27 +0300 |
commit | bd18a539e26aca452ec606741337a8364889cec5 (patch) | |
tree | 35f5ac38a0e9c2c0cc3cb56792edaa8527415cf4 /resources/qml/Toolbar.qml | |
parent | b25d6360ab257a6c74ddada197e48bdd162b0f70 (diff) |
Only update position of label when it's visible
This prevents unneeded re-rendering
Diffstat (limited to 'resources/qml/Toolbar.qml')
-rw-r--r-- | resources/qml/Toolbar.qml | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index c2a70143c3..ab32bff619 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -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; |