diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-30 02:57:53 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-07-30 02:57:53 +0400 |
commit | 408ba429e6aa392f769aac4a442a7a06c1740326 (patch) | |
tree | 63ae81d4fd4799cf3d6e4afd444681c6fc5ea1d3 /source/blender/blenkernel/intern/screen.c | |
parent | 2df1eeba0e212fe551f2e4cbfe222bd36026670f (diff) |
2.5: Buttons View
* When resizing the window, the top position is now preserved,
instead of the center position.
* Fix zoom level not being preserved in various cases, when
changing both with and height. This replaces some earlier code
which did this at screen level but wasn't very reliable.
* Different tabs now each preserve their own scroll.
* When switching between tabs, it now scrolls to show as many
buttons as possible, instead of possibly showing empty space.
There is a trade-off here between doing that keeping the
buttons in the same place, no ideal solution exists I think.
* Change zooming in/out to be symmetric, for example doing
numpad + then - did not give the original zoom level back.
* Added some calls to avoid hanging tooltips when manipulating
the view.
Internals:
* Added V2D_KEEPOFS_X and V2D_KEEPOFS_Y to keep the top/bottom
rather than the center.
* Renamed V2D_KEEPZOOM to V2D_LIMITZOOM (seems more appropriate),
and make V2D_KEEPZOOM preserve the zoom level.
Diffstat (limited to 'source/blender/blenkernel/intern/screen.c')
-rw-r--r-- | source/blender/blenkernel/intern/screen.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index c1f621274c0..cc740d7fb3d 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -179,6 +179,9 @@ ARegion *BKE_area_region_copy(SpaceType *st, ARegion *ar) else newar->regiondata= MEM_dupallocN(ar->regiondata); } + + if(ar->v2d.tab_offset) + newar->v2d.tab_offset= MEM_dupallocN(ar->v2d.tab_offset); newar->panels.first= newar->panels.last= NULL; BLI_duplicatelist(&newar->panels, &ar->panels); @@ -271,10 +274,14 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar) } else if(ar->type && ar->type->free) ar->type->free(ar); + + if(ar->v2d.tab_offset) { + MEM_freeN(ar->v2d.tab_offset); + ar->v2d.tab_offset= NULL; + } - if(ar) { + if(ar) BLI_freelistN(&ar->panels); - } } /* not area itself */ |