From 97de1dda47794387f8917d3bd0b35e3899598b05 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 10 Aug 2016 20:20:51 -0300 Subject: [PATCH] eeshow/gui.c (struct gui_sheet): record ctx, to allow for simpler callbacks --- eeshow/gui.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eeshow/gui.c b/eeshow/gui.c index d9af5eb..c4c22ea 100644 --- a/eeshow/gui.c +++ b/eeshow/gui.c @@ -45,6 +45,7 @@ struct gui_ctx; struct gui_sheet { const struct sheet *sch; + struct gui_ctx *ctx; /* back link */ struct cro_ctx *gfx_ctx; int w, h; /* in eeschema coordinates */ @@ -939,6 +940,7 @@ static struct gui_sheet *get_sheets(struct gui_ctx *ctx, for (sheet = sheets; sheet; sheet = sheet->next) { new = alloc_type(struct gui_sheet); new->sch = sheet; + new->ctx = ctx; new->rendered = 0; *next = new;