summaryrefslogtreecommitdiff
path: root/gui/sheet.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-19 12:24:05 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-19 12:24:05 -0300
commit01a2756e617ac919f1c5df0bac4785b63a504560 (patch)
tree218544d6ae3f6d92d638ff5f17b15af301589d75 /gui/sheet.c
parent1513da9d6bf2f0d42398e5d7ff410d0d595d6cd3 (diff)
downloadeeshow-01a2756e617ac919f1c5df0bac4785b63a504560.tar.gz
eeshow-01a2756e617ac919f1c5df0bac4785b63a504560.tar.bz2
eeshow-01a2756e617ac919f1c5df0bac4785b63a504560.zip
eeshow/gui/: in diff_old, use sheet from old_hist for AoIs
Diffstat (limited to 'gui/sheet.c')
-rw-r--r--gui/sheet.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/sheet.c b/gui/sheet.c
index 5385850..9736bf4 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -367,6 +367,10 @@ static bool sheet_click(void *user, int x, int y)
canvas_coord(ctx, x, y, &ex, &ey);
+ if (ctx->old_hist && ctx->diff_mode == diff_old)
+ curr_sheet = find_corresponding_sheet(ctx->old_hist->sheets,
+ ctx->new_hist->sheets, ctx->curr_sheet);
+
if (aoi_click(ctx->aois, x, y))
return 1;
if (aoi_click(curr_sheet->aois,
@@ -388,6 +392,10 @@ static bool sheet_hover_update(void *user, int x, int y)
canvas_coord(ctx, x, y, &ex, &ey);
+ if (ctx->old_hist && ctx->diff_mode == diff_old)
+ curr_sheet = find_corresponding_sheet(ctx->old_hist->sheets,
+ ctx->new_hist->sheets, ctx->curr_sheet);
+
if (aoi_hover(ctx->aois, x, y))
return 1;
return aoi_hover(curr_sheet->aois,