UI: Support UI operators with configurable shortcuts
After all a super simple solution that allows us to get rid of hardcoded keymap items.
This commit is contained in:
parent
622c9ced6c
commit
d10f54ee75
|
@ -1185,8 +1185,6 @@ void ED_operatortypes_ui(void)
|
|||
|
||||
/**
|
||||
* \brief User Interface Keymap
|
||||
*
|
||||
* For now only modal maps here, since UI uses special ui-handlers instead of operators.
|
||||
*/
|
||||
void ED_keymap_ui(wmKeyConfig *keyconf)
|
||||
{
|
||||
|
|
|
@ -1367,9 +1367,12 @@ static void region_subwindow(wmWindow *win, ARegion *ar, bool activate)
|
|||
static void ed_default_handlers(wmWindowManager *wm, ScrArea *sa, ListBase *handlers, int flag)
|
||||
{
|
||||
/* note, add-handler checks if it already exists */
|
||||
|
||||
|
||||
/* XXX it would be good to have boundbox checks for some of these... */
|
||||
if (flag & ED_KEYMAP_UI) {
|
||||
wmKeyMap *keymap = WM_keymap_find(wm->defaultconf, "User Interface", 0, 0);
|
||||
WM_event_add_keymap_handler(handlers, keymap);
|
||||
|
||||
/* user interface widgets */
|
||||
UI_region_handlers_add(handlers);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue