Restored old hack to open/close panels on A-key.

Notes in code:

- This has to become a decent handler
- Actually "A" should open/close all?

Currently, Enter key does open/close too, but only on headers.
This because Enter on a button gets handled by buttons... that's
why the Akey was proposed :)
This commit is contained in:
Ton Roosendaal 2012-12-20 18:04:06 +00:00
parent 2421ffc85e
commit 291f59c339

@ -1150,7 +1150,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
}
/* XXX hardcoded key warning */
if (inside && event->val == KM_PRESS) {
if ((inside || inside_header) && event->val == KM_PRESS) {
if (event->type == AKEY && !ELEM4(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift, event->alt)) {
if (pa->flag & PNL_CLOSEDY) {