Tool System: tools are now set by name

This avoids having to store the tool definition in the operator
properties (on redraw).

Now just set the name, note this means we can't show the keymap in the
tool-tip anymore. This will eventually be shown in the status bar.
This commit is contained in:
2018-05-13 10:01:56 +02:00
parent e1772dac70
commit e7ee9cfd9e
3 changed files with 19 additions and 39 deletions

View File

@@ -10332,7 +10332,7 @@ bool UI_but_is_tool(const uiBut *but)
if (but->optype != NULL) {
static wmOperatorType *ot = NULL;
if (ot == NULL) {
ot = WM_operatortype_find("WM_OT_tool_set", false);
ot = WM_operatortype_find("WM_OT_tool_set_by_name", false);
}
if (but->optype == ot) {
return true;