Fix #30958: Right click menu and add shortcut for importers/exporters doesn't work

This was caused by how keymap is guessing for importer/exporter:

- In some cases if detected wrong keymap like for IMPORT_CURVE_OT_svg
  curve editing context was used because of CURVE_OT substring in
  operator name
- In other cases no keymap was detected because of substrings
  WM_keymap_guess_opname cheched.

Fixed by using Window keymap for any operator with EXPORT_/IMPORT_ substring
which seems to detect importer/exporter operator and only them nicely.
This commit is contained in:
Sergey Sharybin 2012-04-16 09:55:54 +00:00
parent 4d1c7992d7
commit 987dd55245

@ -1190,6 +1190,10 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname)
else if (strstr(opname, "MARKER_OT")) {
km = WM_keymap_find_all(C, "Markers", 0, 0);
}
/* Import/Export*/
else if (strstr(opname, "IMPORT_") || strstr(opname, "EXPORT_")) {
km = WM_keymap_find_all(C, "Window", 0, 0);
}
/* 3D View */