1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-23 06:29:42 +02:00

eeshow/gui.c (struct gui_sheet): record ctx, to allow for simpler callbacks

This commit is contained in:
Werner Almesberger 2016-08-10 20:20:51 -03:00
parent cf2ca585f5
commit 97de1dda47

View File

@ -45,6 +45,7 @@ struct gui_ctx;
struct gui_sheet { struct gui_sheet {
const struct sheet *sch; const struct sheet *sch;
struct gui_ctx *ctx; /* back link */
struct cro_ctx *gfx_ctx; struct cro_ctx *gfx_ctx;
int w, h; /* in eeschema coordinates */ 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) { for (sheet = sheets; sheet; sheet = sheet->next) {
new = alloc_type(struct gui_sheet); new = alloc_type(struct gui_sheet);
new->sch = sheet; new->sch = sheet;
new->ctx = ctx;
new->rendered = 0; new->rendered = 0;
*next = new; *next = new;