forked from bartvdbraak/blender
Bugfix #26174
Shift+A "add primitive" menu didn't allow to set shortcuts on the sublevels.
This commit is contained in:
parent
bc15e0e295
commit
d6f69a2c19
@ -440,6 +440,7 @@ static wmKeyMapItem *wm_keymap_item_find_handlers(const bContext *C, ListBase *h
|
||||
|
||||
if(keymap && (!keymap->poll || keymap->poll((bContext*)C))) {
|
||||
for(kmi=keymap->items.first; kmi; kmi=kmi->next) {
|
||||
|
||||
if(strcmp(kmi->idname, opname) == 0 && WM_key_event_string(kmi->type)[0]) {
|
||||
if (hotkey)
|
||||
if (!ISHOTKEY(kmi->type))
|
||||
@ -803,9 +804,19 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
|
||||
/* Editing Modes */
|
||||
else if (strstr(opname, "MESH_OT")) {
|
||||
km = WM_keymap_find_all(C, "Mesh", 0, 0);
|
||||
|
||||
/* some mesh operators are active in object mode too, like add-prim */
|
||||
if(km && km->poll && km->poll((bContext *)C)==0) {
|
||||
km = WM_keymap_find_all(C, "Object Mode", 0, 0);
|
||||
}
|
||||
}
|
||||
else if (strstr(opname, "CURVE_OT")) {
|
||||
km = WM_keymap_find_all(C, "Curve", 0, 0);
|
||||
|
||||
/* some curve operators are active in object mode too, like add-prim */
|
||||
if(km && km->poll && km->poll((bContext *)C)==0) {
|
||||
km = WM_keymap_find_all(C, "Object Mode", 0, 0);
|
||||
}
|
||||
}
|
||||
else if (strstr(opname, "ARMATURE_OT")) {
|
||||
km = WM_keymap_find_all(C, "Armature", 0, 0);
|
||||
@ -818,6 +829,11 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
|
||||
}
|
||||
else if (strstr(opname, "MBALL_OT")) {
|
||||
km = WM_keymap_find_all(C, "Metaball", 0, 0);
|
||||
|
||||
/* some mball operators are active in object mode too, like add-prim */
|
||||
if(km && km->poll && km->poll((bContext *)C)==0) {
|
||||
km = WM_keymap_find_all(C, "Object Mode", 0, 0);
|
||||
}
|
||||
}
|
||||
else if (strstr(opname, "LATTICE_OT")) {
|
||||
km = WM_keymap_find_all(C, "Lattice", 0, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user