Fix: Operator depends on cursor ignores macro operators

The change in 23ebc45f700b7670616 was slightly incorrect.
This commit is contained in:
Hans Goudey 2024-03-19 11:58:41 -04:00
parent 2090ba8b07
commit 62b484544a

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