mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 01:51:33 +02:00
eeshow/gui.c (sheet_selector_recurse): we can now jump to the exact sheet
No need for the "go up" hack.
This commit is contained in:
parent
97de1dda47
commit
2ab72ab0e3
18
eeshow/gui.c
18
eeshow/gui.c
@ -555,9 +555,10 @@ static void mark_aois(struct gui_ctx *ctx, struct gui_sheet *sheet);
|
|||||||
|
|
||||||
static void close_subsheet(void *user)
|
static void close_subsheet(void *user)
|
||||||
{
|
{
|
||||||
struct gui_ctx *ctx = user;
|
struct gui_sheet *sheet = user;
|
||||||
|
struct gui_ctx *ctx = sheet->ctx;
|
||||||
|
|
||||||
go_up_sheet(ctx);
|
go_to_sheet(ctx, sheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -627,10 +628,9 @@ static struct gui_sheet *find_parent_sheet(struct gui_sheet *sheets,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void sheet_selector_recurse(struct gui_ctx *ctx,
|
static void sheet_selector_recurse(struct gui_ctx *ctx, struct gui_sheet *sheet)
|
||||||
const struct gui_sheet *sheet)
|
|
||||||
{
|
{
|
||||||
const struct gui_sheet *parent;
|
struct gui_sheet *parent;
|
||||||
const char *title;
|
const char *title;
|
||||||
struct overlay *over;
|
struct overlay *over;
|
||||||
|
|
||||||
@ -640,14 +640,8 @@ static void sheet_selector_recurse(struct gui_ctx *ctx,
|
|||||||
title = sheet->sch->title;
|
title = sheet->sch->title;
|
||||||
if (!title)
|
if (!title)
|
||||||
title = "(unnamed)";
|
title = "(unnamed)";
|
||||||
/*
|
|
||||||
* @@@ dirty hack: instead of jumping to the selected sheet (which
|
|
||||||
* would require a little more work), we merely go "up". In a flat
|
|
||||||
* hierarchy with just one level of sub-sheets, that does pretty
|
|
||||||
* much what one would expect from proper jumping.
|
|
||||||
*/
|
|
||||||
over = overlay_add(&ctx->sheet_overlays, &ctx->aois,
|
over = overlay_add(&ctx->sheet_overlays, &ctx->aois,
|
||||||
NULL, close_subsheet, ctx);
|
NULL, close_subsheet, sheet);
|
||||||
overlay_text(over, "<b>%s</b>", title);
|
overlay_text(over, "<b>%s</b>", title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user