Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-12-01 14:37:05 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-01 14:37:05 +0300
commit1a354bd31097729b3e19b0a4786fcc7248c10ad2 (patch)
treeb34e07e713e7ae91b261c1647850874c6d0e64bf /source/blender/blenloader
parent3ff7c28e7bcd5790afae0bf40ff9c421af14afd2 (diff)
View2D - Zoom + More Scrollbar work
* Added basic (non-modal) zoom operators that use a uniform scale factor, with zoom centered using the view center as scaling point. Use Scrollwheel up/down and Pad +/- to use this. * Added back the 'button'/bubble for the scrollbars. I've added dark lines on either end of it for some later work on zooming widgets. This is not the final form they'll take. I still need to decide how to handle those scrollbars which act as grid-markers too (showing timescale, etc.), before trying to integrate that with some fancy scrollbar drawing (rounded, etc.) Assorted changes: * Moved vertical scrollbar for Outliner to right hand side * Made Timeline use standard scrollbars, and turned on various clamping options * Fixed ortho-matrix corrections for scrollbars, and added pixel offsets * Made Timeline markers sit more snugly on the scrollbar. They were a bit far out... * Fixed memory leak with view2d keymaps not being freed when Blender exited
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a4038f29c3b..097c654de51 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5073,12 +5073,26 @@ static void do_versions_windowmanager_2_50(bScreen *screen)
/* if active spacetype has view2d data, copy that over to main region */
switch(sa->spacetype) {
case SPACE_OOPS:
- memcpy(&ar->v2d, &((SpaceOops *)sa->spacedata.first)->v2d, sizeof(View2D));
+ {
+ SpaceOops *soops= sa->spacedata.first;
+
+ memcpy(&ar->v2d, &soops->v2d, sizeof(View2D));
+ ar->v2d.scroll &= ~L_SCROLL;
+ ar->v2d.scroll |= R_SCROLL;
+ }
break;
case SPACE_TIME:
- memcpy(&ar->v2d, &((SpaceTime *)sa->spacedata.first)->v2d, sizeof(View2D));
+ {
+ SpaceTime *stime= sa->spacedata.first;
+ memcpy(&ar->v2d, &stime->v2d, sizeof(View2D));
+
+ ar->v2d.scroll |= (B_SCROLL|BGRID_SCROLL);
+ ar->v2d.keepofs |= V2D_LOCKOFS_Y;
+ }
break;
//case SPACE_XXX: // FIXME... add other ones
+ // memcpy(&ar->v2d, &((SpaceXxx *)sa->spacedata.first)->v2d, sizeof(View2D));
+ // break;
}
}
}