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.
This commit is contained in:
Arjen Hiemstra 2017-04-26 16:17:54 +02:00
parent 0fad973181
commit b4f27f0af7

View file

@ -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);
}
}