mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06: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
1 changed files with 3 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue