diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-15 19:01:12 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-04-15 19:01:12 +0400 |
commit | 03d631986234d476d4d763b0fded289b482257b6 (patch) | |
tree | 1295c6b162c73cd529bd16b3148b2a43bb02227f /source/blender/editors/interface/interface_intern.h | |
parent | f6604f7612af998ee275fa0650c5c56f6d208074 (diff) |
Fix: when using a search menu with an operator's enum prop, the operator was previously always executed with default options (appart from the search-set enum, of course). Now we store the op's properties in search button, so that you can specify non-default options (as it was already possible with e.g. pop-up menu from an operator's enum prop).
To achieve this, some code (callbacks and search button creation) was moved from wm_operators.c to interface/interface.c, and a new UI function was added, uiDefSearchButO_ptr.
Note: This new code uses the fact that uiButHandleFunc callbacks get executed before operator when one of its arg is the button itself!
Many thanks to Campbell who helped me a lot with this patch!
Cleanup: also removed two unused pointers from uiBut struct.
Diffstat (limited to 'source/blender/editors/interface/interface_intern.h')
-rw-r--r-- | source/blender/editors/interface/interface_intern.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h index 378ea51f16a..874928ae749 100644 --- a/source/blender/editors/interface/interface_intern.h +++ b/source/blender/editors/interface/interface_intern.h @@ -201,7 +201,6 @@ struct uiBut { uiButHandleFunc func; void *func_arg1; void *func_arg2; - void *func_arg3; uiButHandleNFunc funcN; void *func_argN; @@ -251,7 +250,6 @@ struct uiBut { /* Operator data */ struct wmOperatorType *optype; - struct IDProperty *opproperties; struct PointerRNA *opptr; short opcontext; unsigned char menu_key; /* 'a'-'z', always lower case */ |