Fix "Finish" buttons not clearing tool properly

This commit is contained in:
David Rowe 2017-08-22 14:35:56 +12:00
parent 72166dcfab
commit c953df0040
2 changed files with 12 additions and 3 deletions

View file

@ -336,7 +336,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
label: "FINISH",
command: {
method: "closeOptions"
method: "clearTool"
}
}
],
@ -358,7 +358,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
label: "FINISH",
command: {
method: "closeOptions"
method: "clearTool"
}
}
],
@ -813,7 +813,7 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
},
label: "FINISH",
command: {
method: "closeOptions"
method: "clearTool"
}
}
]
@ -1619,6 +1619,10 @@ ToolMenu = function (side, leftInputs, rightInputs, uiCommandCallback) {
closeOptions();
break;
case "clearTool":
uiCommandCallback("clearTool");
break;
default:
App.log(side, "ERROR: ToolMenu: Unexpected command! " + command);
}

View file

@ -846,6 +846,7 @@
toolSelected = TOOL_NONE;
grouping.clear();
ui.clearTool();
ui.updateUIEntities();
}
}
@ -1378,6 +1379,10 @@
ui.setToolIcon(ui.DELETE_TOOL);
ui.updateUIEntities();
break;
case "clearTool":
ui.clearTool();
ui.updateUIEntities();
break;
case "groupButton":
grouping.group();