From 16c5aeba687609b307978eaec12e49776f57a846 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Thu, 1 Oct 2015 12:30:37 +0200 Subject: [PATCH] Use selection status to disable/enable tools rather than platform activity Fixes issues with tool activation. --- resources/qml/Toolbar.qml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/qml/Toolbar.qml b/resources/qml/Toolbar.qml index ffdf0604a0..206fb69261 100644 --- a/resources/qml/Toolbar.qml +++ b/resources/qml/Toolbar.qml @@ -14,7 +14,6 @@ Item { width: buttons.width; height: buttons.height property int activeY - property bool activity: Printer.getPlatformActivity; ColumnLayout { id: buttons; @@ -34,7 +33,7 @@ Item { checkable: true; checked: model.active; - enabled: base.activity + enabled: UM.Selection.hasSelection; style: UM.Theme.styles.tool_button; @@ -43,10 +42,8 @@ Item { MouseArea { anchors.fill: parent; onClicked: { - if (base.activity){ - parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); - base.activeY = parent.y - } + parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id); + base.activeY = parent.y } } }