From 2ab999851c158868626fa31010f0bdcb547f6032 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 7 Mar 2016 14:12:44 +0100 Subject: [PATCH] Toolbar correctly shows location of toolpanel when not triggered through QML Contributes to CURA-838 --- resources/qml/Toolbar.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index 631445d987..4ef78b18aa 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -36,14 +36,19 @@ Item { enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled; style: UM.Theme.styles.tool_button; - + onCheckedChanged: + { + if(checked) + { + base.activeY = y + } + } //Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead //just catch the click so we do not trigger that behaviour. MouseArea { anchors.fill: parent; onClicked: { parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); - base.activeY = parent.y } } }