summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README1
-rw-r--r--TODO2
-rw-r--r--gui/common.h8
-rw-r--r--gui/gui.c18
-rw-r--r--gui/render.c3
-rw-r--r--gui/sheet.c5
-rw-r--r--help.html3
-rw-r--r--help.txt1
8 files changed, 38 insertions, 3 deletions
diff --git a/README b/README
index 6f40f1d..a830abd 100644
--- a/README
+++ b/README
@@ -198,6 +198,7 @@ Up or Down invoke the revision history (WIP)
Tab toggle between old and new revision
Esc cancel current action (exit history, close pop-up,
de-highlight glabel, close help)
+E show/hide extra information (pin types)
H show/hide help window
D when comparing revisions, show difference (default)
N show newer sheet
diff --git a/TODO b/TODO
index 2f81a5e..dfa11ab 100644
--- a/TODO
+++ b/TODO
@@ -18,7 +18,6 @@ Visualization (dwg.c and such):
- show open pins / wires
- check remaining alignment / direction / rotation cases in switch statements
- support mirroring (and detect-complain if unexpected) [should be done now]
-- optionally display pin type
- record.c (bb_rot): implement bounding boxes for text
- nesting gfx in diff is a huge kludge, caused by global vars in gfx.c
@@ -38,6 +37,7 @@ Rendering:
- diff area algorithm will fill anything resembling a closed path, no matter
how little is inside (e.g., a changed large but empty rectangle will be
filled)
+- PDF has visible rounding errors at the default scale
GUI:
- fonts grow beyond their bounding boxes when zooming in
diff --git a/gui/common.h b/gui/common.h
index 32a9a19..2ad96a8 100644
--- a/gui/common.h
+++ b/gui/common.h
@@ -37,7 +37,7 @@ struct gui_sheet {
int w, h; /* in eeschema coordinates */
int xmin, ymin;
- bool rendered; /* 0 if still have to render it */
+ bool rendered; /* 0 if we still have to render it */
struct overlay *over; /* current overlay */
struct aoi *aois; /* areas of interest; in schematics coord */
@@ -127,6 +127,10 @@ void progress_update(struct gui_ctx *ctx);
/* render.c */
+extern bool use_delta;
+extern bool show_extra;
+
+
void redraw(const struct gui_ctx *ctx);
void render_sheet(struct gui_sheet *sheet);
void render_delta(struct gui_ctx *ctx);
@@ -149,7 +153,7 @@ void show_history(struct gui_ctx *ctx, enum selecting sel);
/* gui.c */
-extern bool use_delta;
+void unrender_all(struct gui_ctx *ctx);
struct gui_sheet *find_corresponding_sheet(struct gui_sheet *pick_from,
struct gui_sheet *ref_in, const struct gui_sheet *ref);
diff --git a/gui/gui.c b/gui/gui.c
index 5fe3cc9..dd00832 100644
--- a/gui/gui.c
+++ b/gui/gui.c
@@ -43,6 +43,24 @@
#include "gui/gui.h"
+/* ----- @@@ Hack: discard all rendering on major mode change -------------- */
+
+void unrender_all(struct gui_ctx *ctx)
+{
+ const struct gui_hist *h;
+ struct gui_sheet *sheet;
+
+ for (h = ctx->hist; h; h = h->next)
+ for (sheet = h->sheets; sheet; sheet = sheet->next) {
+ /*
+ * @@@ if there was a gfx_free, we wouldn't create a
+ * massive memory leak here.
+ */
+ sheet->rendered = 0;
+ }
+}
+
+
/* ----- Helper functions -------------------------------------------------- */
diff --git a/gui/render.c b/gui/render.c
index ec4db2e..64ddb7c 100644
--- a/gui/render.c
+++ b/gui/render.c
@@ -41,6 +41,7 @@
bool use_delta = 0;
+bool show_extra = 0;
/* ----- Helper functions -------------------------------------------------- */
@@ -235,6 +236,8 @@ void render_sheet(struct gui_sheet *sheet)
pl_render(sheet->hist->pl, sheet->hist->sch_ctx.sheets,
sheet->sch);
sch_render(sheet->sch);
+ if (show_extra)
+ sch_render_extra(sheet->sch);
cro_canvas_end(gfx_ctx,
&sheet->w, &sheet->h, &sheet->xmin, &sheet->ymin);
sheet->gfx_ctx = gfx_ctx;
diff --git a/gui/sheet.c b/gui/sheet.c
index d25343f..8a7414a 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -550,6 +550,11 @@ static void sheet_key(void *user, int x, int y, int keyval)
do_revision_overlays(ctx);
redraw(ctx);
break;
+ case GDK_KEY_e:
+ show_extra = !show_extra;
+ unrender_all(ctx);
+ go_to_sheet(ctx, ctx->curr_sheet);
+ break;
case GDK_KEY_n:
ctx->diff_mode = diff_new;
diff --git a/help.html b/help.html
index fc281f6..7b4c1f8 100644
--- a/help.html
+++ b/help.html
@@ -33,6 +33,9 @@
<TD>cancel current action (exit history, close pop-up,
de-highlight glabel, close help)
<TR>
+ <TD>E
+ <TD>show/hide extra information (pin types)
+ <TR>
<TD>H
<TD>open/close help window
<TR>
diff --git a/help.txt b/help.txt
index 1db38ca..5f18ab7 100644
--- a/help.txt
+++ b/help.txt
@@ -11,6 +11,7 @@ Up or Down invoke the revision history (WIP)
Tab toggle between old and new revision
Esc cancel current action (exit history, close
pop-up, de-highlight glabel, close help)
+E show/hide extra information (pin types)
H show/hide help window
D when comparing revisions, show difference
N show newer sheet