Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 19233) +++ trunk/src/draw.c (revision 19234) @@ -500,6 +500,19 @@ pcb_r_search(PCB->Data->padstack_tree, drawn_area, NULL, pcb_pstk_draw_hole_callback, &ctx, NULL); } +static void pcb_draw_pstk_slots(pcb_layergrp_id_t group, const pcb_box_t *drawn_area, pcb_pstk_draw_hole_t holetype) +{ + pcb_pstk_draw_t ctx; + + if (!PCB->hole_on) + return; + + ctx.pcb = PCB; + ctx.gid = group; + ctx.holetype = holetype; + pcb_r_search(PCB->Data->padstack_tree, drawn_area, NULL, pcb_pstk_draw_slot_callback, &ctx, NULL); +} + /* --------------------------------------------------------------------------- * Draws padstacks - Always draws for non-gui HIDs, * otherwise drawing depends on PCB->pstk_on Index: trunk/src/draw_ly_spec.c =================================================================== --- trunk/src/draw_ly_spec.c (revision 19233) +++ trunk/src/draw_ly_spec.c (revision 19234) @@ -176,11 +176,11 @@ if (!(ly->comb & PCB_LYC_AUTO)) return; - if (g->purpi = F_uroute) { + if (g->purpi == F_uroute) { dslot = uslot; dscore = uscore; } - else if (g->purpi = F_proute) { + else if (g->purpi == F_proute) { dslot = pslot; dscore = pscore; } @@ -191,8 +191,8 @@ if (g->ltype & PCB_LYT_MECH) score = 2; if (score > *pscore) { - *pscore = score; - *pslot = ly; + *dscore = score; + *dslot = ly; } } @@ -204,6 +204,7 @@ pcb_layer_t *uslot = NULL, *pslot = NULL; int uscore = 0, pscore = 0; comp_ctx_t cctx; + pcb_pstk_draw_hole_t ht; cctx.pcb = PCB; cctx.screen = drawn_area; @@ -272,6 +273,15 @@ pcb_gui->set_drawing_mode(PCB_HID_COMP_FLUSH, pcb_draw_out.direct, cctx.screen); } + + /* draw slots */ + ht = 0; + if ((uslot != NULL) && (uslot->meta.real.vis)) + ht |= PCB_PHOLE_UNPLATED; + if ((pslot != NULL) && (pslot->meta.real.vis)) + ht |= PCB_PHOLE_PLATED; + if (ht != 0) + pcb_draw_pstk_slots(CURRENT->meta.real.grp, drawn_area, ht | PCB_PHOLE_BB); }