mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 3 additions and 9 deletions
|
|
@ -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
|
|
||||||
MouseArea
|
|
||||||
{
|
|
||||||
anchors.fill: parent;
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
forceActiveFocus() //First grab focus, so all the text fields are updated
|
forceActiveFocus() //First grab focus, so all the text fields are updated
|
||||||
CuraActions.setExtruderForSelection(extruder.id);
|
CuraActions.setExtruderForSelection(extruder.id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue