diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-16 10:30:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-16 10:30:14 +0400 |
commit | 55a560c0c4578de7d7378fdc3a3f533adce05b8c (patch) | |
tree | e0591531a26140e65748ca9853dd497af19a802a /source/blender/editors/space_view3d/view3d_toolbar.c | |
parent | ec5d518300ec981d902fae6a45454ff0ae94269a (diff) | |
parent | 0b23d378fbac8e76d4885c3485a4dbf158aab136 (diff) |
svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_toolbar.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_toolbar.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index f06b4678d70..0cfeaffe981 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -46,6 +46,7 @@ #include "BLI_editVert.h" #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BLI_ghash.h" #include "BKE_context.h" #include "BKE_idprop.h" @@ -140,10 +141,11 @@ static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2) static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items) { - wmOperatorType *ot = WM_operatortype_first(); - - for(; ot; ot= ot->next) { - + GHashIterator *iter= WM_operatortype_iter(); + + for( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + if(BLI_strcasestr(ot->name, str)) { if(WM_operator_poll((bContext*)C, ot)) { @@ -152,6 +154,7 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons } } } + BLI_ghashIterator_free(iter); } |