diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-12 19:29:33 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-12 19:29:33 +0300 |
commit | 2fa23a05941c652228d76c36e8f4d7e927538c8d (patch) | |
tree | 4d478b8b1dd6035efbb55478a4c767ca6debbb4d /source/blender/blenloader | |
parent | 05e5e00bc9fb5d0fd8f49d2315d4061cacdb83ab (diff) |
2.5
Fixes in view2d:
- mask/slider rects were calculated wrong 1 pixel (was overlapping)
- found bug with outliner stretching on area-edge-dragging. It required
an extra mapping of the 'cur view' via mask to actual region.
- added v2d sanity check for uninitialized v2d's
- removed cruft in do_versions for headers (gets catched with above)
- added header-view2d-initialize function, for new-space calls
Fixes in areamanager:
- fixes in 'new space' for time/outliner/view2d
(unfinished)
For Joshua:
- Making time window higher shows it doesn't update 'cur'. Not sure
what kind of v2d flag should be checked or set?
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e7a3ad21da8..1685f57dace 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5051,34 +5051,13 @@ static void area_add_header_region(ScrArea *sa, ListBase *lb) ar->alignment= RGN_ALIGN_TOP; /* initialise view2d data for header region, to allow panning */ + /* is copy from ui_view2d.c */ ar->v2d.keepaspect= 1; ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_KEEPZOOM); ar->v2d.keepofs = V2D_LOCKOFS_Y; ar->v2d.keeptot = 2; // this keeps the view in place when region size changes... ar->v2d.align = V2D_ALIGN_NO_NEG_X; - ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; - - ar->v2d.mask.xmin= ar->v2d.mask.ymin= 0; - ar->v2d.mask.xmax= sa->winx; - ar->v2d.mask.ymax= HEADERY; - - ar->v2d.cur.xmin= sa->headbutofs; - ar->v2d.cur.xmax= sa->winx + sa->headbutofs; - ar->v2d.tot.xmin= 0.0f; - ar->v2d.tot.xmax= sa->headbutlen; - - if (ar->alignment == RGN_ALIGN_BOTTOM) { - ar->v2d.align = V2D_ALIGN_NO_NEG_Y; - ar->v2d.tot.ymin= ar->v2d.cur.ymin= 0.0f; // what was area->headrct.ymin? - ar->v2d.tot.ymax= ar->v2d.cur.ymax= HEADERY; - } - else { - // XXX what were the extents of the old headers? - ar->v2d.align = V2D_ALIGN_NO_NEG_Y; - ar->v2d.tot.ymin= ar->v2d.cur.ymin= 0.0f; // what was area->headrct.ymin? - ar->v2d.tot.ymax= ar->v2d.cur.ymax= HEADERY; - } } /* 2.50 patch */ |