mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 06:08:58 +08:00
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:
parent
0fad973181
commit
b4f27f0af7
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user