diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-04-03 19:18:59 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-04-03 19:18:59 +0400 |
commit | 123f7d3eb3e7ba14c05e4097a57119bf75e08019 (patch) | |
tree | 2cb3eacdc38914e43a509cdd168c921a9174344d /source/blender/editors/include | |
parent | f137ba074abb599ea2b4226f47a4234cb6995f1e (diff) |
Popup menu layout inherits context store from button.
When adding extra context data in a layout using uiLayoutSetContextPointer, this info was not inherited by popup menus generated in this layout. While operators from regular buttons work fine, the data is missing in operators from menus and such. This patch copies the bContextStore from buttons to the new uiLayout used for popups.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 18e2af939fd..cdb2472706c 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -48,6 +48,7 @@ struct wmWindowManager; struct wmOperator; struct AutoComplete; struct bContext; +struct bContextStore; struct Panel; struct PanelType; struct PointerRNA; @@ -692,6 +693,7 @@ uiBlock *uiLayoutGetBlock(uiLayout *layout); void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv); void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr); +void uiLayoutContextCopy(uiLayout *layout, struct bContextStore *context); const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag); struct MenuType *uiButGetMenuType(uiBut *but); |