Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 30053) +++ trunk/src/obj_pstk.h (revision 30054) @@ -201,7 +201,8 @@ void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, pcb_bool is_absolute, pcb_coord_t val); void pcb_pstk_shape_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val); void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable); -void pcb_pstk_shape_clr_grow(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val, int undoable); +void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val); +void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable); void pcb_pstk_shape_scale(pcb_pstk_proto_t *proto, int tridx, int shpidx, double sx, double sy, int undoable); /* Derive (copy and bloat) the shape at dst_idx from src_idx; set the mask and comb Index: trunk/src/obj_pstk_proto.c =================================================================== --- trunk/src/obj_pstk_proto.c (revision 30053) +++ trunk/src/obj_pstk_proto.c (revision 30054) @@ -1169,15 +1169,7 @@ } } -void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable) -{ - pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; - pcb_pstk_shape_t *shp = &tshp->shape[shpidx]; - TODO("undo"); - pcb_pstk_shape_grow_(shp, is_absolute, val); -} - static void pcb_pstk_shape_scale_(pcb_pstk_shape_t *shp, double sx, double sy) { pcb_coord_t cx, cy; @@ -1215,6 +1207,35 @@ } } +void pcb_pstk_shape_clr_grow_(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val) +{ + if (is_absolute) + shp->clearance = val; + else + shp->clearance += val; +} + + + +void pcb_pstk_shape_clr_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable) +{ + pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; + pcb_pstk_shape_t *shp = &tshp->shape[shpidx]; + +TODO("padstack: undo") + + pcb_pstk_shape_clr_grow_(shp, is_absolute, val); +} + +void pcb_pstk_shape_grow(pcb_pstk_proto_t *proto, int tridx, int shpidx, pcb_bool is_absolute, pcb_coord_t val, int undoable) +{ + pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; + pcb_pstk_shape_t *shp = &tshp->shape[shpidx]; + + TODO("undo"); + pcb_pstk_shape_grow_(shp, is_absolute, val); +} + void pcb_pstk_shape_scale(pcb_pstk_proto_t *proto, int tridx, int shpidx, double sx, double sy, int undoable) { pcb_pstk_tshape_t *tshp = &proto->tr.array[tridx]; @@ -1225,14 +1246,6 @@ pcb_pstk_shape_scale_(shp, sx, sy); } -void pcb_pstk_shape_clr_grow(pcb_pstk_shape_t *shp, pcb_bool is_absolute, pcb_coord_t val, int undoable) -{ -TODO("padstack: undo") - if (is_absolute) - shp->clearance = val; - else - shp->clearance += val; -} void pcb_pstk_proto_grow(pcb_pstk_proto_t *proto, pcb_bool is_absolute, pcb_coord_t val) { Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 30053) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 30054) @@ -361,7 +361,7 @@ pcb_pstkop_clip(&ctx, pse->ps); for(n = 0; n < proto->tr.used; n++) - pcb_pstk_shape_clr_grow(&proto->tr.array[n].shape[sidx], pcb_true, pse->attrs[pse->proto_clr[idx]].val.crd, 1); + pcb_pstk_shape_clr_grow(proto, n, sidx, pcb_true, pse->attrs[pse->proto_clr[idx]].val.crd, 1); ctx.clip.clear = 1; ctx.clip.restore = 0;