mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 03:25:56 +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;
|
style: UM.Theme.styles.tool_button;
|
||||||
iconSource: checked ? UM.Theme.getIcon("material_selected") : UM.Theme.getIcon("material_not_selected");
|
iconSource: checked ? UM.Theme.getIcon("material_selected") : UM.Theme.getIcon("material_not_selected");
|
||||||
|
|
||||||
checkable: true;
|
|
||||||
checked: ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1
|
checked: ExtruderManager.selectedObjectExtruders.indexOf(extruder.id) != -1
|
||||||
enabled: UM.Selection.hasSelection
|
enabled: UM.Selection.hasSelection
|
||||||
|
|
||||||
@ -73,14 +72,9 @@ Button
|
|||||||
border.color: UM.Theme.getColor("lining");
|
border.color: UM.Theme.getColor("lining");
|
||||||
}
|
}
|
||||||
|
|
||||||
// See line 51, same workaround
|
onClicked:
|
||||||
MouseArea
|
|
||||||
{
|
{
|
||||||
anchors.fill: parent;
|
forceActiveFocus() //First grab focus, so all the text fields are updated
|
||||||
onClicked:
|
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