Index: propedit.c =================================================================== --- propedit.c (revision 27273) +++ propedit.c (revision 27274) @@ -39,6 +39,7 @@ #include "layer_grp.h" #include "search.h" #include "crosshair.h" +#include "compat_misc.h" int prop_scope_add(pcb_propedit_t *pe, const char *cmd, int quiet) @@ -105,6 +106,14 @@ vtl0_append(&pe->layers, INDEXOFCURRENT); } } + else if (strncmp(cmd, "net:", 4) == 0) { + char *name = pcb_strdup(cmd+4); + if (!pe->nets_inited) { + htsp_init(&pe->nets, strhash, strkeyeq); + pe->nets_inited = 1; + } + htsp_set(&pe->nets, name, name); + } else if ((strcmp(cmd, "board") == 0) || (strcmp(cmd, "pcb") == 0)) pe->board = 1; else if (strcmp(cmd, "selection") == 0) @@ -132,6 +141,14 @@ to add them again */ while((idp = pcb_idpath_list_first(&pe->objs)) != NULL) pcb_idpath_list_remove(idp); + + if (pe->nets_inited) { + htsp_entry_t *e; + for(e = htsp_first(&pe->nets); e != NULL; e = htsp_next(&pe->nets, e)) + free(e->key); + htsp_uninit(&pe->nets); + pe->nets_inited = 0; + } } extern pcb_layergrp_id_t pcb_actd_EditGroup_gid; Index: props.h =================================================================== --- props.h (revision 27273) +++ props.h (revision 27274) @@ -79,6 +79,7 @@ /* scope */ pcb_board_t *pcb; pcb_data_t *data; /* change this after init in case of subc */ + htsp_t nets; /* target objects */ pcb_idpath_list_t objs; @@ -86,6 +87,7 @@ vtl0_t layergrps; /* layer group IDs */ unsigned selection:1; /* all selected objects on the current pcb */ unsigned board:1; /* run on the board too */ + unsigned nets_inited:1; /* whether the ->nets hash is initialized */ } pcb_propedit_t; /* A property list (props) is a string->pcb_props_t. Each entry is a named