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>2009-07-10 16:42:17 +0400
committerJoshua Leung <aligorith@gmail.com>2009-07-10 16:42:17 +0400
commitb609f2aa790e122504aad34512d08241c2e01079 (patch)
treeb12159e5848e718922bb484fc38e2a11f27ad6ad
parentd6ef4380a0d23acb619018fdaf84f5381b71f325 (diff)
NLA SoC: Attempt at solving the jumping-views problem
The 'jumping-views' problem affected the NLA and DopeSheet editors, whereby the channels-list and the data-area would get out of sync (vertically) due to the size calculations of the two being done differently.
-rw-r--r--source/blender/editors/space_action/action_draw.c2
-rw-r--r--source/blender/editors/space_nla/nla_draw.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index 93d061e8bf3..2fd5b9bbd93 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -422,6 +422,8 @@ void draw_channel_names(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
*/
v2d->tot.ymin= (float)(-height);
}
+ /* need to do a view-sync here, so that the keys 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)ACHANNEL_FIRST;
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 6219acf6fae..7fb15c62277 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -512,6 +512,8 @@ 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);