summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-30 18:53:23 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-09-30 18:53:23 (GMT)
commit04028ddfd75b4a867ec1964db306dc22b7f2252d (patch)
treee56ee0f2b45ee9807824939e5f1cf39882379015
parent14908ebcc9eb2d602627797360f099ed0dad8e99 (diff)
downloadeeshow-04028ddfd75b4a867ec1964db306dc22b7f2252d.zip
eeshow-04028ddfd75b4a867ec1964db306dc22b7f2252d.tar.gz
eeshow-04028ddfd75b4a867ec1964db306dc22b7f2252d.tar.bz2
Shift + R now toggles visibility of invisible component references
Such things should be rare in normal use of KiCad, but can occur when working with unusual designs.
-rw-r--r--README1
-rw-r--r--gfx/gfx.h1
-rw-r--r--gui/sheet.c4
-rw-r--r--help.html3
-rw-r--r--help.txt1
-rw-r--r--kicad/sch-render.c15
6 files changed, 18 insertions, 7 deletions
diff --git a/README b/README
index 4907b43..6638665 100644
--- a/README
+++ b/README
@@ -229,6 +229,7 @@ Esc cancel current action (exit history, close pop-up,
de-highlight glabel, close help)
E show/hide extra information (pin types)
F toggle showing footprints, even if invisible
+Shift + R idem, for component references
Shift+D toggle between "diff" and experimental "delta" mode
H show/hide help window
T toggle performance timer
diff --git a/gfx/gfx.h b/gfx/gfx.h
index 0e73ba8..1f8364a 100644
--- a/gfx/gfx.h
+++ b/gfx/gfx.h
@@ -22,6 +22,7 @@
enum gfx_extra {
gfx_pin_type = 1 << 1,
gfx_footprint = 1 << 2,
+ gfx_reference = 1 << 3,
};
struct gfx;
diff --git a/gui/sheet.c b/gui/sheet.c
index ca321ab..f1a4656 100644
--- a/gui/sheet.c
+++ b/gui/sheet.c
@@ -566,6 +566,10 @@ static void sheet_key(void *user, int x, int y, int keyval)
show_extra ^= gfx_footprint;
redraw(gui);
break;
+ case GDK_KEY_R: /* Shift + R */
+ show_extra ^= gfx_reference;
+ redraw(gui);
+ break;
case GDK_KEY_n:
gui->diff_mode = diff_new;
diff --git a/help.html b/help.html
index 0603443..61d3bb6 100644
--- a/help.html
+++ b/help.html
@@ -39,6 +39,9 @@
<TD>F
<TD>toggle showing footprints, even if invisible
<TR>
+ <TD>Shift+R
+ <TD>idem, for component references
+ <TR>
<TD>Shift+D
<TD>toggle between "diff" and experimental "delta" mode
<TR>
diff --git a/help.txt b/help.txt
index 6ffee27..e701032 100644
--- a/help.txt
+++ b/help.txt
@@ -13,6 +13,7 @@ Esc cancel current action (exit history, close
pop-up, de-highlight glabel, close help)
E show/hide extra information (pin types)
F toggle showing footprints, even if invisible
+Shift+R idem, for component references
Shift+D toggle between "diff" and experimental
"delta" mode
H show/hide help window
diff --git a/kicad/sch-render.c b/kicad/sch-render.c
index fdb945d..37633e5 100644
--- a/kicad/sch-render.c
+++ b/kicad/sch-render.c
@@ -123,15 +123,16 @@ static void render_comp(const struct sch_comp *comp, struct gfx *gfx)
lib_render(comp->comp, gfx, comp->unit, comp->convert, comp->m);
for (field = comp->fields; field; field = field->next) {
- if (field->visible) {
- dump_field(field, gfx, comp->m);
- } else {
- if (field->n == 2) {
+ if (!field->visible) {
+ if (field->n == 0)
+ gfx_set_extra(gfx, gfx_reference);
+ else if (field->n == 2)
gfx_set_extra(gfx, gfx_footprint);
- dump_field(field, gfx, comp->m);
- gfx_set_extra(gfx, 0);
- }
+ else
+ continue;
}
+ dump_field(field, gfx, comp->m);
+ gfx_set_extra(gfx, 0);
}
}