fix [#32384] Submenu hotkeys not working at all since 2.6x
authorCampbell Barton <ideasman42@gmail.com>
Mon, 10 Sep 2012 06:10:43 +0000 (06:10 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 10 Sep 2012 06:10:43 +0000 (06:10 +0000)
source/blender/editors/interface/interface_handlers.c

index 6b8ed5fd99716ffe93b456baf6264c358841cda1..53cd7f3fb58c5193b263da9610193f68f6c89a06 100644 (file)
@@ -6353,7 +6353,16 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle
                                                        }
                                                        
                                                        if (doit) {
-                                                               ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY);
+                                                               /* activate buttons but open menu's */
+                                                               uiButtonActivateType activate;
+                                                               if (but->type == PULLDOWN) {
+                                                                       activate = BUTTON_ACTIVATE_OPEN;
+                                                               }
+                                                               else {
+                                                                       activate = BUTTON_ACTIVATE_APPLY;
+                                                               }
+
+                                                               ui_handle_button_activate(C, ar, but, activate);
                                                                break;
                                                        }
                                                }