summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-22 05:37:23 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-22 05:37:23 -0300
commit9fe255f4aceb3ac5f5b0915d2a314b25d0e00863 (patch)
treea37632fd7b63090297e2e269eef95e28748511bd /gui
parentaedcf7b6fe9dcc07c0fc1badd73ca970cddc3e0c (diff)
downloadeeshow-9fe255f4aceb3ac5f5b0915d2a314b25d0e00863.tar.gz
eeshow-9fe255f4aceb3ac5f5b0915d2a314b25d0e00863.tar.bz2
eeshow-9fe255f4aceb3ac5f5b0915d2a314b25d0e00863.zip
eeshow/gui/common.h (struct gui_sheet): add back link to history
Diffstat (limited to 'gui')
-rw-r--r--gui/common.h2
-rw-r--r--gui/gui.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/gui/common.h b/gui/common.h
index 9882121..cf82f47 100644
--- a/gui/common.h
+++ b/gui/common.h
@@ -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 */
diff --git a/gui/gui.c b/gui/gui.c
index f7f2038..d880be6 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -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;