From b4f27f0af7c1fd640638e77f773a84b4a9781f47 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 26 Apr 2017 16:17:54 +0200 Subject: [PATCH] Remove checkable property and MouseArea in favor of onClicked on the button It turns out, setting checkable: true causes binding breakage. Without checkable, checked still works and we can use onClicked of the button directly. --- resources/qml/ExtruderButton.qml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/resources/qml/ExtruderButton.qml b/resources/qml/ExtruderButton.qml index 8a088890a9..ba503dba2b 100644 --- a/resources/qml/ExtruderButton.qml +++ b/resources/qml/ExtruderButton.qml @@ -18,7 +18,6 @@ Button style: UM.Theme.styles.tool_button; iconSource: checked ? UM.Theme.getIcon("material_selected") : UM.Theme.getIcon("material_not_selected"); - checkable: true; checked: ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1 enabled: UM.Selection.hasSelection @@ -73,14 +72,9 @@ Button border.color: UM.Theme.getColor("lining"); } - // See line 51, same workaround - MouseArea + onClicked: { - anchors.fill: parent; - onClicked: - { - forceActiveFocus() //First grab focus, so all the text fields are updated - CuraActions.setExtruderForSelection(extruder.id); - } + forceActiveFocus() //First grab focus, so all the text fields are updated + CuraActions.setExtruderForSelection(extruder.id); } }