Index: trunk/src/obj_pstk.h =================================================================== --- trunk/src/obj_pstk.h (revision 20388) +++ trunk/src/obj_pstk.h (revision 20389) @@ -172,7 +172,9 @@ void pcb_pstk_shape_update_pa(pcb_pstk_poly_t *poly); /* Insert proto into the cache of data; if it's already in, return the existing - ID, else dup it and insert it. */ + ID, else dup it and insert it. WARNING: make sure + pcb_pstk_proto_update() was called on proto some point in time before this + call, esle the hash is invalid */ pcb_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet); /* Change the non-NULL hole properties of a padstack proto; undoable. Index: trunk/src_plugins/dialogs/dlg_padstack.c =================================================================== --- trunk/src_plugins/dialogs/dlg_padstack.c (revision 20388) +++ trunk/src_plugins/dialogs/dlg_padstack.c (revision 20389) @@ -582,6 +582,7 @@ proto.hdia = pse->attrs[pse->gen_drill].default_val.coord_value; proto.hplated = 1; + pcb_pstk_proto_update(&proto); pid = pcb_pstk_proto_insert_dup(pse->data, &proto, 1); pcb_pstk_change_instance(pse->ps, &pid, NULL, NULL, NULL, NULL); Index: trunk/src_plugins/io_dsn/read.c =================================================================== --- trunk/src_plugins/io_dsn/read.c (revision 20388) +++ trunk/src_plugins/io_dsn/read.c (revision 20389) @@ -810,6 +810,7 @@ } } + pcb_pstk_proto_update(prt); htsp_set(&ctx->protos, prt->name, prt); if (old_unit != NULL) Index: trunk/src_plugins/lib_compat_help/pstk_compat.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 20388) +++ trunk/src_plugins/lib_compat_help/pstk_compat.c (revision 20389) @@ -194,6 +194,7 @@ proto.hdia = drill_dia; proto.hplated = plated; + pcb_pstk_proto_update(&proto); pid = pcb_pstk_proto_insert_dup(data, &proto, 1); if (pid == PCB_PADSTACK_INVALID) { compat_shape_free(&copper_master); @@ -517,6 +518,7 @@ shape[2].comb = PCB_LYC_AUTO; } + pcb_pstk_proto_update(&proto); pid = pcb_pstk_proto_insert_dup(data, &proto, 1); for(n = 0; n < tshp.len; n++) Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 20388) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 20389) @@ -47,6 +47,7 @@ proto.hdia = drill_dia; proto.hplated = plated; + pcb_pstk_proto_update(&proto); pid = pcb_pstk_proto_insert_dup(data, &proto, 1); return pcb_pstk_new(data, pid, x, y, 0, pcb_flag_make(PCB_FLAG_CLEARLINE)); @@ -305,6 +306,7 @@ proto.hdia = drill_dia; proto.hplated = plated; + pcb_pstk_proto_update(&proto); pid = pcb_pstk_proto_insert_dup(data, &proto, 1); if (pid == PCB_PADSTACK_INVALID) return NULL;