aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2014-10-24 23:17:29 +0200
committerThomas White <taw@bitwiz.org.uk>2014-10-24 23:17:29 +0200
commitaa50d04c76414d1a558811afa22fb540edb8a90a (patch)
treef9b82ae4aa864309e2b687a097eb7d27514f03bc /tests
parentf50b956ed7fa2a9affa448cfc89f3027749954c9 (diff)
render_test_sc1: unset all frames
Diffstat (limited to 'tests')
-rw-r--r--tests/render_test_sc1.c17
1 files changed, 17 insertions, 0 deletions
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);