diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_menu_type.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_menu_type.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_menu_type.c b/source/blender/windowmanager/intern/wm_menu_type.c index 4e71001990d..020d08f35fa 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" @@ -34,8 +35,8 @@ #include "BLI_ghash.h" #include "BKE_context.h" -#include "BKE_library.h" #include "BKE_screen.h" +#include "BKE_workspace.h" #include "WM_api.h" #include "WM_types.h" @@ -99,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); } |