Use selection status to disable/enable tools rather than platform activity

Fixes issues with tool activation.
This commit is contained in:
Arjen Hiemstra 2015-10-01 12:30:37 +02:00
parent f9be4def09
commit 16c5aeba68

View file

@ -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
}
}
}