From 0e40abf642b4360212b72791a01b4e7fe0cfacf5 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 4 Sep 2009 11:19:12 +0000 Subject: 2.5 - Patches + Cleanups * Some of the patches in patch #19034 - by Wolfgang W. (bender) - outliner.patch - a small fix to make the outliner draw the last line of the list, if the list is bigger than the window. - scroll.patch - enables vertical scrolling in the buttons window in horizontal mode. Necessary if a panel is opened that is higher than the buttons window. * Also, fixed some messy comments in drivers code --- source/blender/editors/screen/area.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/screen/area.c') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 8c55cccd6b0..9a116bf95c0 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1248,6 +1248,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex /* before setting the view */ if(vertical) { + /* only allow scrolling in vertical direction */ v2d->keepofs |= V2D_LOCKOFS_X|V2D_KEEPOFS_Y; v2d->keepofs &= ~(V2D_LOCKOFS_Y|V2D_KEEPOFS_X); @@ -1258,8 +1259,12 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, char *contex y= -y; } else { - v2d->keepofs |= V2D_LOCKOFS_Y|V2D_KEEPOFS_X; - v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y); + /* for now, allow scrolling in both directions (since layouts are optimised for vertical, + * they often don't fit in horizontal layout) + */ + v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_LOCKOFS_Y|V2D_KEEPOFS_X|V2D_KEEPOFS_Y); + //v2d->keepofs |= V2D_LOCKOFS_Y|V2D_KEEPOFS_X; + //v2d->keepofs &= ~(V2D_LOCKOFS_X|V2D_KEEPOFS_Y); // don't jump back when panels close or hide if(!newcontext) -- cgit v1.2.3