diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-18 01:36:02 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-18 01:36:02 +0400 |
commit | 69e919530e179c0ac251534003e3ab8f540e82fe (patch) | |
tree | f45b87b1d2a31c94540011c3f5f828d073f12cae /source/blender/editors/mesh/mesh_ops.c | |
parent | b572ae2a8bdd4adfc1641a43ca02061b9ae6eff9 (diff) |
Keymaps now have a poll() function, rather than adding/removing
their handlers based on notifiers, which is simpler and more
reliable.
This fixes for example editmode or uv edit keymaps not working
when creating a new 3dview or image space.
Diffstat (limited to 'source/blender/editors/mesh/mesh_ops.c')
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 6da42f28af4..f22adc597c7 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -349,9 +349,12 @@ void ED_operatortypes_mesh(void) /* note mesh keymap also for other space? */ void ED_keymap_mesh(wmWindowManager *wm) { - ListBase *keymap= WM_keymap_listbase(wm, "EditMesh", 0, 0); + wmKeyMap *keymap; wmKeymapItem *kmi; + keymap= WM_keymap_find(wm, "EditMesh", 0, 0); + keymap->poll= ED_operator_editmesh; + WM_keymap_add_item(keymap, "MESH_OT_loopcut", ACTIONMOUSE, KM_PRESS, KM_CTRL, RKEY); /* selecting */ |