From aa50d04c76414d1a558811afa22fb540edb8a90a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 24 Oct 2014 23:17:29 +0200 Subject: render_test_sc1: unset all frames --- tests/render_test_sc1.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/render_test_sc1.c b/tests/render_test_sc1.c index df36b26..b1acbad 100644 --- a/tests/render_test_sc1.c +++ b/tests/render_test_sc1.c @@ -44,6 +44,22 @@ static gint mw_destroy(GtkWidget *w, void *p) exit(0); } + +static void unset_all_frames(SCBlock *bl) +{ + while ( bl != NULL ) { + sc_block_set_frame(bl, NULL); + if ( sc_block_child(bl) != NULL ) { + unset_all_frames(sc_block_child(bl)); + } + if ( sc_block_macro_child(bl) != NULL ) { + unset_all_frames(sc_block_macro_child(bl)); + } + bl = sc_block_next(bl); + } +} + + static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data) { gint w, h; @@ -72,6 +88,7 @@ static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data) top.num_children = 0; top.max_children = 0; top.boxes = NULL; + unset_all_frames(scblocks); surface = render_sc(scblocks, w, h, w, h, &top, NULL, NULL, ISZ_EDITOR, 1); -- cgit v1.2.3