diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index 5e1b897956a..61e666b9d3f 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -1969,16 +1969,17 @@ void WM_operator_name_call_ptr_with_depends_on_cursor(bContext *C, const wmEvent *event, const char *drawstr) { - int flag = ot->flag; + bool depends_on_cursor = WM_operator_depends_on_cursor(*C, *ot, properties); LISTBASE_FOREACH (wmOperatorTypeMacro *, macro, &ot->macro) { - wmOperatorType *otm = WM_operatortype_find(macro->idname, false); - if (otm != nullptr) { - flag |= otm->flag; + if (wmOperatorType *otm = WM_operatortype_find(macro->idname, false)) { + if (WM_operator_depends_on_cursor(*C, *otm, properties)) { + depends_on_cursor = true; + } } } - if (!WM_operator_depends_on_cursor(*C, *ot, properties)) { + if (!depends_on_cursor) { WM_operator_name_call_ptr(C, ot, opcontext, properties, event); return; }