UI fixes, from the todo:
authorTon Roosendaal <ton@blender.org>
Thu, 20 Dec 2012 19:18:46 +0000 (19:18 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 20 Dec 2012 19:18:46 +0000 (19:18 +0000)
- Button panel animation didn't work for 3D View properties and similar regions.
- Akey on View3d overlapping panel: was accidentally passed on as event to the main window.

source/blender/editors/interface/interface_panel.c

index bf6b78b63c022b0fc585f52bd9027959d01fc555..5b6a609e4d21b20525c3c613eebfff075774fe47 100644 (file)
@@ -133,8 +133,6 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
                        if (sbuts->re_align || sbuts->mainbo != sbuts->mainb)
                                return 1;
        }
-       else if (ar->regiontype == RGN_TYPE_UI)
-               return 1;
        else if (sa->spacetype == SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW)
                return 1;
        else if (sa->spacetype == SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS)
@@ -917,6 +915,7 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y)
 
        /* re-align, possibly with animation */
        if (panels_re_align(sa, ar, &pa)) {
+               /* XXX code never gets here... PNL_ANIM_ALIGN flag is never set */
                if (pa)
                        panel_activate_state(C, pa, PANEL_STATE_ANIMATION);
                else
@@ -1160,6 +1159,7 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
                                else
                                        ui_handle_panel_header(C, block, mx, my, event->type, event->ctrl);
                                
+                               retval = WM_UI_HANDLER_BREAK;
                                continue;
                        }
                }