mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-10-10 15:27:53 -06:00
Toolbar correctly shows location of toolpanel when not triggered through QML
Contributes to CURA-838
This commit is contained in:
parent
a785c9a205
commit
2ab999851c
1 changed files with 7 additions and 2 deletions
|
@ -36,14 +36,19 @@ Item {
|
||||||
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled;
|
enabled: model.enabled && UM.Selection.hasSelection && UM.Controller.toolsEnabled;
|
||||||
|
|
||||||
style: UM.Theme.styles.tool_button;
|
style: UM.Theme.styles.tool_button;
|
||||||
|
onCheckedChanged:
|
||||||
|
{
|
||||||
|
if(checked)
|
||||||
|
{
|
||||||
|
base.activeY = y
|
||||||
|
}
|
||||||
|
}
|
||||||
//Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead
|
//Workaround since using ToolButton"s onClicked would break the binding of the checked property, instead
|
||||||
//just catch the click so we do not trigger that behaviour.
|
//just catch the click so we do not trigger that behaviour.
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||||
base.activeY = parent.y
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue