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>2010-10-16 09:07:33 +0400
committerJoshua Leung <aligorith@gmail.com>2010-10-16 09:07:33 +0400
commitad65cd59870df1e59a5960c7c355c2c888a8141a (patch)
tree9ed30bf8877f4a0a15ea565ed946ac5d11b256ea /source/blender/editors/space_nla
parent00e3ef9b132db3c9136322bd7de1e50c862e883c (diff)
Bugfix #24099: nla content moves out of sync - with fix
Thanks Shane Ambler (sambler) for the patch! <quote> This kind of follows on from a report that I think was closed prematurely - #22775 - I can't find any reference to an outstanding todo that relates to it. When resizing the nla editor the channel names and the main area get out of sync. When toggling back from fullscreen the content is hidden off the top of the area requiring scrolling to see it. The dopesheet displays similar problems but after fixing the ui_view2d_sync call it appears to behave as if the v2d.keepofs has been set for the most part. Two areas seem to be related to this - the first is calls to UI_view2d_sync used for these two views use the wrong flags. The other is v2d.keepofs not being set. (dopesheet has less issue here but I think it is meant to be set the same as nla) </quote>
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r--source/blender/editors/space_nla/nla_draw.c4
-rw-r--r--source/blender/editors/space_nla/space_nla.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index ef9c46c8042..7df9db11472 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -477,8 +477,6 @@ void draw_nla_main_data (bAnimContext *ac, SpaceNla *snla, ARegion *ar)
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
v2d->tot.ymin= (float)(-height);
- /* need to do a view-sync here, so that the strips area doesn't jump around */
- UI_view2d_sync(NULL, ac->sa, v2d, V2D_VIEWSYNC_AREA_VERTICAL);
/* loop through channels, and set up drawing depending on their type */
y= (float)(-NLACHANNEL_HEIGHT);
@@ -837,6 +835,8 @@ void draw_nla_channel_list (bContext *C, bAnimContext *ac, SpaceNla *snla, ARegi
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
v2d->tot.ymin= (float)(-height);
+ /* need to do a view-sync here, so that the keys area doesn't jump around (it must copy this) */
+ UI_view2d_sync(NULL, ac->sa, v2d, V2D_LOCK_COPY);
/* draw channels */
{ /* first pass: backdrops + oldstyle drawing */
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 2ae47ddbc7f..ad6e183995f 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -148,16 +148,17 @@ static SpaceLink *nla_new(const bContext *C)
ar->v2d.cur = ar->v2d.tot;
ar->v2d.min[0]= 0.0f;
- ar->v2d.min[1]= 0.0f;
+ ar->v2d.min[1]= 0.0f;
ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 10000.0f;
+ ar->v2d.max[1]= 10000.0f;
ar->v2d.minzoom= 0.01f;
ar->v2d.maxzoom= 50;
ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
ar->v2d.keepzoom= V2D_LOCKZOOM_Y;
+ ar->v2d.keepofs= V2D_KEEPOFS_Y;
ar->v2d.align= V2D_ALIGN_NO_POS_Y;
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;