diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-13 19:56:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-13 19:56:59 +0300 |
commit | 6845306c68a874cb1a9171d6a08a1578eea41a8a (patch) | |
tree | 0f7b278334fd4464be715529c188af0480305ad7 /source/blender/windowmanager/intern/wm_menu_type.c | |
parent | 4ca298309620c65e390ccb52e5921bddfd69c31e (diff) |
Correct recent menu split
Somehow duplicate API didn't error when linking.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_menu_type.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_menu_type.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_menu_type.c b/source/blender/windowmanager/intern/wm_menu_type.c index 58e85716bf1..97ca5690954 100644 --- a/source/blender/windowmanager/intern/wm_menu_type.c +++ b/source/blender/windowmanager/intern/wm_menu_type.c @@ -27,6 +27,7 @@ #include "BLI_sys_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_workspace_types.h" #include "MEM_guardedalloc.h" @@ -36,6 +37,7 @@ #include "BKE_context.h" #include "BKE_library.h" #include "BKE_screen.h" +#include "BKE_workspace.h" #include "WM_api.h" #include "WM_types.h" @@ -98,6 +100,14 @@ void WM_menutype_free(void) bool WM_menutype_poll(bContext *C, MenuType *mt) { + /* If we're tagged, only use compatible. */ + if (mt->owner_id[0] != '\0') { + const WorkSpace *workspace = CTX_wm_workspace(C); + if (BKE_workspace_owner_id_check(workspace, mt->owner_id) == false) { + return false; + } + } + if (mt->poll != NULL) { return mt->poll(C, mt); } |