Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 5182) +++ trunk/src/board.h (revision 5183) @@ -104,6 +104,9 @@ pcb_bool is_footprint; /* If set, the user has loaded a footprint, not a pcb. */ + const pcb_attribute_list_t *pen_attr; + + /* netlist states */ int netlist_frozen; /* counter */ unsigned netlist_needs_update:1; Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 5182) +++ trunk/src/gui_act.c (revision 5183) @@ -1124,6 +1124,7 @@ if (Clearance != 0) { pcb_custom_route_style.Clearance = Clearance; conf_set_design("design/clearance", "%$mS", Clearance); } if (Diameter != 0) { pcb_custom_route_style.Diameter = Diameter; conf_set_design("design/via_thickness", "%$mS", Diameter); } if (Hole != 0) { pcb_custom_route_style.Hole = Hole; conf_set_design("design/via_drilling_hole", "%$mS", Hole); } + PCB->pen_attr = NULL; } else pcb_use_route_style_idx(&PCB->RouteStyle, known); Index: trunk/src/obj_common.c =================================================================== --- trunk/src/obj_common.c (revision 5182) +++ trunk/src/obj_common.c (revision 5183) @@ -32,6 +32,7 @@ #include "global_typedefs.h" #include "const.h" #include "error.h" +#include "obj_common.h" /* returns a pointer to an objects bounding box; @@ -90,3 +91,9 @@ { return ID++; } + +void pcb_obj_add_attribs(void *obj, pcb_attribute_list_t *src) +{ + pcb_any_obj_t *o = obj; + pcb_attribute_copy_all(&o->Attributes, src, 0); +} Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 5182) +++ trunk/src/obj_common.h (revision 5183) @@ -34,7 +34,6 @@ #include "attrib.h" #include "global_typedefs.h" - /* point and box type - they are so common everything depends on them */ struct pcb_point_s { /* a line/polygon point */ pcb_coord_t X, Y, X2, Y2; /* so Point type can be cast as pcb_box_t */ @@ -67,6 +66,8 @@ void pcb_create_ID_reset(void); long int pcb_create_ID_get(void); +void pcb_obj_add_attribs(void *obj, pcb_attribute_list_t *src); + /* --------------------------------------------------------------------------- * Do not change the following definitions even if they're not very * nice. It allows us to have functions act on these "base types" and Index: trunk/src/route_style.c =================================================================== --- trunk/src/route_style.c (revision 5182) +++ trunk/src/route_style.c (revision 5183) @@ -32,6 +32,7 @@ #include "error.h" #include "conf.h" #include "misc_util.h" +#include "board.h" pcb_route_style_t pcb_custom_route_style; @@ -154,6 +155,7 @@ conf_set_design("design/via_thickness", "%$mS", rst->Diameter); conf_set_design("design/via_drilling_hole", "%$mS", rst->Hole); conf_set_design("design/clearance", "%$mS", rst->Clearance); + PCB->pen_attr = &rst->attr; } int pcb_use_route_style_idx(vtroutestyle_t *styles, int idx)