diff options
author | Miika Hamalainen <blender@miikah.org> | 2012-07-04 21:15:05 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2012-07-04 21:15:05 +0400 |
commit | 9324503b84a06f76af072131da947547c84698ed (patch) | |
tree | b9336118dcf8df9e9ca4888d9ee3ac9fec2c2798 /source/blender/editors/space_graph | |
parent | 234c338655fc49efef0b7ffe0ef6736e8630411a (diff) | |
parent | 958cf139f6587df631944f6ec0fcb4111c7e58fa (diff) |
Merge with trunk r48602
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index ddca0030cf5..870e9bb8168 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -276,7 +276,7 @@ static void draw_fcurve_vertices(SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short View2D *v2d = &ar->v2d; /* only draw points if curve is visible - * - draw unselected points before selected points as separate passes to minimise color-changing overhead + * - draw unselected points before selected points as separate passes to minimize color-changing overhead * (XXX dunno if this is faster than drawing all in one pass though) * and also to make sure in the case of overlapping points that the selected is always visible * - draw handles before keyframes, so that keyframes will overlap handles (keyframes are more important for users) @@ -851,7 +851,7 @@ void graph_draw_curves(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGrid setlinestyle(2); } if ( ((fcu->grp) && (fcu->grp->flag & AGRP_MUTED)) || (fcu->flag & FCURVE_MUTED) ) { - /* muted curves are drawn in a greyish hue */ + /* muted curves are drawn in a grayish hue */ // XXX should we have some variations? UI_ThemeColorShade(TH_HEADER, 50); } diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 756e6997fc8..f4cb4ec3d05 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -189,6 +189,8 @@ static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) sipo->ads->source = (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now... } + /* force immediate init of any invalid F-Curve colors */ + sipo->flag |= SIPO_TEMP_NEEDCHANSYNC; ED_area_tag_refresh(sa); } @@ -477,7 +479,13 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn) if (wmn->data == ND_SPACE_GRAPH) ED_area_tag_redraw(sa); break; - + case NC_WINDOW: + if (sipo->flag & SIPO_TEMP_NEEDCHANSYNC) { + /* force redraw/refresh after undo/redo - prevents "black curve" problem */ + ED_area_tag_refresh(sa); + } + break; + // XXX: restore the case below if not enough updates occur... //default: // if (wmn->data==ND_KEYS) |