mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 02:29:02 +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;
|
||||
height: buttons.height
|
||||
property int activeY
|
||||
property bool activity: Printer.getPlatformActivity;
|
||||
|
||||
ColumnLayout {
|
||||
id: buttons;
|
||||
@ -34,7 +33,7 @@ Item {
|
||||
|
||||
checkable: true;
|
||||
checked: model.active;
|
||||
enabled: base.activity
|
||||
enabled: UM.Selection.hasSelection;
|
||||
|
||||
style: UM.Theme.styles.tool_button;
|
||||
|
||||
@ -43,10 +42,8 @@ Item {
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
onClicked: {
|
||||
if (base.activity){
|
||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
base.activeY = parent.y
|
||||
}
|
||||
parent.checked ? UM.Controller.setActiveTool(null) : UM.Controller.setActiveTool(model.id);
|
||||
base.activeY = parent.y
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user