1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-25 20:59:42 +02:00

eeshow/gui/common.h (struct gui_sheet): add back link to history

This commit is contained in:
Werner Almesberger 2016-08-22 05:37:23 -03:00
parent 4711107d7e
commit b925268c90
2 changed files with 5 additions and 2 deletions

View File

@ -26,10 +26,12 @@
struct gui_ctx;
struct gui_hist;
struct gui_sheet {
const struct sheet *sch;
struct gui_ctx *ctx; /* back link */
struct gui_hist *hist; /* back link */
struct cro_ctx *gfx_ctx;
int w, h; /* in eeschema coordinates */

View File

@ -154,7 +154,7 @@ void mark_aois(struct gui_ctx *ctx, struct gui_sheet *sheet)
}
static struct gui_sheet *get_sheets(struct gui_ctx *ctx,
static struct gui_sheet *get_sheets(struct gui_ctx *ctx, struct gui_hist *hist,
const struct sheet *sheets)
{
const struct sheet *sheet;
@ -166,6 +166,7 @@ static struct gui_sheet *get_sheets(struct gui_ctx *ctx,
new = alloc_type(struct gui_sheet);
new->sch = sheet;
new->ctx = ctx;
new->hist = hist;
new->rendered = 0;
*next = new;
@ -324,7 +325,7 @@ static void add_hist(void *user, struct hist *h)
hist->libs_open = 0;
hist->identical = 0;
sch = parse_files(hist, ahc->n_args, ahc->args, ahc->recurse, prev);
hist->sheets = sch ? get_sheets(ctx, sch) : NULL;
hist->sheets = sch ? get_sheets(ctx, hist, sch) : NULL;
hist->age = age;
hist->next = NULL;