diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-12-06 12:25:42 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-12-06 12:25:42 +0300 |
commit | afb45ae7cf67d18c2749a172c2a4ec5d57ce8003 (patch) | |
tree | 989660478ca582a862216a00bcf4f4bf40772075 /source/blender/editors/space_outliner | |
parent | 8a04f039adc852644bbdc8231353cce215692874 (diff) |
View2D: Code cleanup - UI_view2d_status_enforce()
This commit *should* bring UI_view2d_status_enforce() (formerly known in pre 2.5 as test_view2d) under control again.
I've attempted to reduce the amount of duplicated code here, so hopefully there won't be any nasty bugs that will show up in some of the other views when they are ported.
Summary of changes:
* Restored V2D_KEEPZOOM flag which I had previously removed, having misunderstood its function.
* Fixed bugs with resizing Outliner window
* Outliner width is now columns + 1 again. Documented reasons for this (otherwise, stuff gets covered by scrollbars, but we cannot see it)
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 6039bee3db5..c568741f0ab 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -390,14 +390,19 @@ static void outliner_main_area_draw(const bContext *C, ARegion *ar) } RNA_property_collection_end(&cell.iter); - + + /* determine extents of data + * - height must be at least the height of the mask area + * - width is columns + 1, as otherwise, part of last column + * will be obscured by scrollers + */ if ((rows*ROW_HEIGHT) > height) height= rows * ROW_HEIGHT; - width= cols * COLUMN_WIDTH; + width= (cols + 1) * COLUMN_WIDTH; /* need to validate view2d after updating size of tot */ UI_view2d_totRect_set(v2d, width, height); - UI_view2d_status_enforce(v2d, awidth, aheight); + UI_view2d_status_enforce(v2d); rct.xmin= 0; rct.ymin= -height; |