Index: propsel.c =================================================================== --- propsel.c (revision 27274) +++ propsel.c (revision 27275) @@ -40,6 +40,7 @@ #include "pcb-printf.h" #include "conf_core.h" #include "hidlib_conf.h" +#include "netlist.h" /*********** map ***********/ #define type2field_String string @@ -154,6 +155,14 @@ map_attr(ctx, &grp->Attributes); } +static void map_net(pcb_propedit_t *ctx, const char *netname) +{ + pcb_net_t *net = pcb_net_get(ctx->pcb, &PCB->netlist[PCB_NETLIST_EDITED], netname, 0); + if (net == NULL) + return; + map_attr(ctx, &net->Attributes); +} + static void map_line(pcb_propedit_t *ctx, pcb_line_t *line) { map_add_prop(ctx, "p/trace/thickness", pcb_coord_t, line->Thickness); @@ -271,6 +280,12 @@ for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) map_any(ctx, pcb_idpath2obj_in(ctx->data, idp)); + if (ctx->nets_inited) { + htsp_entry_t *e; + for(e = htsp_first(&ctx->nets); e != NULL; e = htsp_next(&ctx->nets, e)) + map_net(ctx, e->key); + } + if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it; @@ -391,7 +406,18 @@ } } +static void set_net(pcb_propset_ctx_t *st, const char *netname) +{ + pcb_net_t *net = pcb_net_get(st->pcb, &PCB->netlist[PCB_NETLIST_EDITED], netname, 0); + if (net == NULL) + return; + if (st->is_attr) { + set_attr(st, &net->Attributes); + return; + } +} + static void set_line(pcb_propset_ctx_t *st, pcb_line_t *line) { const char *pn = st->name + 8; @@ -621,6 +647,12 @@ for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) set_any(sctx, pcb_idpath2obj_in(ctx->data, idp)); + if (ctx->nets_inited) { + htsp_entry_t *e; + for(e = htsp_first(&ctx->nets); e != NULL; e = htsp_next(&ctx->nets, e)) + set_net(sctx, e->key); + } + if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it; @@ -688,6 +720,15 @@ return del_attr(ctx, &grp->Attributes, key); } +static long del_net(pcb_propedit_t *ctx, const char *netname, const char *key) +{ + pcb_net_t *net = pcb_net_get(ctx->pcb, &PCB->netlist[PCB_NETLIST_EDITED], netname, 0); + if (net == NULL) + return; + + return del_attr(ctx, &net->Attributes, key); +} + static long del_any(void *ctx, pcb_any_obj_t *o, const char *key) { return del_attr(ctx, &o->Attributes, key); @@ -718,6 +759,12 @@ for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) del_cnt += del_any(ctx, pcb_idpath2obj_in(ctx->data, idp), key); + if (ctx->nets_inited) { + htsp_entry_t *e; + for(e = htsp_first(&ctx->nets); e != NULL; e = htsp_next(&ctx->nets, e)) + del_cnt += del_net(ctx, e->key, key); + } + if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it;