mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 08:28:59 +08:00
Use selection status to disable/enable tools rather than platform activity
Fixes issues with tool activation.
This commit is contained in:
parent
f9be4def09
commit
16c5aeba68
@ -14,7 +14,6 @@ Item {
|
|||||||
width: buttons.width;
|
width: buttons.width;
|
||||||
height: buttons.height
|
height: buttons.height
|
||||||
property int activeY
|
property int activeY
|
||||||
property bool activity: Printer.getPlatformActivity;
|
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: buttons;
|
id: buttons;
|
||||||
@ -34,7 +33,7 @@ Item {
|
|||||||
|
|
||||||
checkable: true;
|
checkable: true;
|
||||||
checked: model.active;
|
checked: model.active;
|
||||||
enabled: base.activity
|
enabled: UM.Selection.hasSelection;
|
||||||
|
|
||||||
style: UM.Theme.styles.tool_button;
|
style: UM.Theme.styles.tool_button;
|
||||||
|
|
||||||
@ -43,7 +42,6 @@ Item {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (base.activity){
|
|
||||||
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
|
base.activeY = parent.y
|
||||||
}
|
}
|
||||||
@ -51,7 +49,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: base.width
|
width: base.width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user