diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-19 07:18:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-19 08:17:21 +0300 |
commit | f88ea20285891d516c91c976239f95994f73abf3 (patch) | |
tree | ef07c2513dcfc688d9c6cdd2fa8aa2fdf8b98d32 /source/blender/editors | |
parent | eae2942474fa06b369b3fc6ebdeddad90ca38d43 (diff) |
WM: move operator handler to it's own type
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_script/script_edit.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c index 9b5f3d634c9..4b5cd6b7166 100644 --- a/source/blender/editors/space_script/script_edit.c +++ b/source/blender/editors/space_script/script_edit.c @@ -26,6 +26,7 @@ #include <stdio.h> #include "BLI_utildefines.h" +#include "BLI_listbase.h" #include "BKE_context.h" #include "BKE_report.h" @@ -88,13 +89,14 @@ static bool script_test_modal_operators(bContext *C) wm = CTX_wm_manager(C); for (win = wm->windows.first; win; win = win->next) { - wmEventHandler *handler; - - for (handler = win->modalhandlers.first; handler; handler = handler->next) { - if (handler->op) { - wmOperatorType *ot = handler->op->type; - if (ot->ext.srna) { - return true; + LISTBASE_FOREACH (wmEventHandler *, handler_base, &win->modalhandlers) { + if (handler_base->type == WM_HANDLER_TYPE_OP) { + wmEventHandler_Op *handler = (wmEventHandler_Op *)handler_base; + if (handler->op != NULL) { + wmOperatorType *ot = handler->op->type; + if (ot->ext.srna) { + return true; + } } } } |