Index: trunk/src_plugins/propedit/propdlg.c =================================================================== --- trunk/src_plugins/propedit/propdlg.c (revision 24314) +++ trunk/src_plugins/propedit/propdlg.c (revision 24315) @@ -150,7 +150,7 @@ gds_append_str(&scope, "selected objects, "); inv = 0; for(n = 0, l = ctx->pe.layers.array; n < vtl0_len(&ctx->pe.layers); n++, l++) { - const char *name = pcb_layer_name(ctx->pe.pcb->Data, *l); + const char *name = pcb_layer_name(ctx->pe.data, *l); if (name != 0) { gds_append_str(&scope, "layer: "); gds_append_str(&scope, name); @@ -177,7 +177,7 @@ inv = 0; for(idp = pcb_idpath_list_first(&ctx->pe.objs); idp != NULL; idp = pcb_idpath_list_next(idp)) { - pcb_any_obj_t *o = pcb_idpath2obj(ctx->pe.pcb->Data, idp); + pcb_any_obj_t *o = pcb_idpath2obj(ctx->pe.data, idp); if (o != NULL) pcb_append_printf(&scope, "%s #%ld, ", pcb_obj_type_name(o->type), o->ID); else Index: trunk/src_plugins/propedit/propedit.c =================================================================== --- trunk/src_plugins/propedit/propedit.c (revision 24314) +++ trunk/src_plugins/propedit/propedit.c (revision 24315) @@ -90,7 +90,7 @@ } else if (strncmp(cmd, "layer", 5) == 0) { if (cmd[5] == ':') { - id = pcb_layer_str2id(pe->pcb->Data, cmd+6); + id = pcb_layer_str2id(pe->data, cmd+6); if (id < 0) { if (!quiet) pcb_message(PCB_MSG_ERROR, "Invalid layer ID '%s'\n", cmd+6); Index: trunk/src_plugins/propedit/props.c =================================================================== --- trunk/src_plugins/propedit/props.c (revision 24314) +++ trunk/src_plugins/propedit/props.c (revision 24315) @@ -27,6 +27,7 @@ #include "props.h" #include "propsel.h" #include "compat_misc.h" +#include "board.h" #include "pcb-printf.h" #include "hid.h" #include @@ -79,6 +80,7 @@ memset(ctx, 0, sizeof(pcb_propedit_t)); htsp_init(&ctx->props, strhash, strkeyeq); ctx->pcb = pcb; + ctx->data = pcb->Data; } void pcb_props_reset(pcb_propedit_t *ctx) Index: trunk/src_plugins/propedit/props.h =================================================================== --- trunk/src_plugins/propedit/props.h (revision 24314) +++ trunk/src_plugins/propedit/props.h (revision 24315) @@ -78,6 +78,7 @@ /* scope */ pcb_board_t *pcb; + pcb_data_t *data; /* change this after init in case of subc */ /* target objects */ pcb_idpath_list_t objs; Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 24314) +++ trunk/src_plugins/propedit/propsel.c (revision 24315) @@ -250,18 +250,18 @@ size_t n; for(n = 0; n < vtl0_len(&ctx->layers); n++) - map_layer(ctx, pcb_get_layer(ctx->pcb->Data, ctx->layers.array[n])); + map_layer(ctx, pcb_get_layer(ctx->data, ctx->layers.array[n])); for(n = 0; n < vtl0_len(&ctx->layergrps); n++) map_layergrp(ctx, pcb_get_layergrp(ctx->pcb, ctx->layergrps.array[n])); for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) - map_any(ctx, pcb_idpath2obj(ctx->pcb->Data, idp)); + map_any(ctx, pcb_idpath2obj(ctx->data, idp)); if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it; - for(o = pcb_data_first(&it, ctx->pcb->Data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) + for(o = pcb_data_first(&it, ctx->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, o)) map_any(ctx, o); } @@ -562,6 +562,7 @@ pcb_idpath_t *idp; sctx->pcb = ctx->pcb; + sctx->data = ctx->data; sctx->is_trace = (strncmp(prop, "p/trace/", 8) == 0); sctx->is_attr = (prop[0] == 'a'); sctx->name = prop; @@ -569,18 +570,18 @@ pcb_undo_save_serial(); for(n = 0; n < vtl0_len(&ctx->layers); n++) - set_layer(sctx, pcb_get_layer(ctx->pcb->Data, ctx->layers.array[n])); + set_layer(sctx, pcb_get_layer(ctx->data, ctx->layers.array[n])); for(n = 0; n < vtl0_len(&ctx->layergrps); n++) set_layergrp(sctx, pcb_get_layergrp(ctx->pcb, ctx->layergrps.array[n])); for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) - set_any(sctx, pcb_idpath2obj(ctx->pcb->Data, idp)); + set_any(sctx, pcb_idpath2obj(ctx->data, idp)); if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it; - for(o = pcb_data_first(&it, ctx->pcb->Data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) + for(o = pcb_data_first(&it, ctx->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, o)) set_any(sctx, o); } @@ -664,18 +665,18 @@ key += 2; for(n = 0; n < vtl0_len(&ctx->layers); n++) - del_cnt += del_layer(ctx, pcb_get_layer(ctx->pcb->Data, ctx->layers.array[n]), key); + del_cnt += del_layer(ctx, pcb_get_layer(ctx->data, ctx->layers.array[n]), key); for(n = 0; n < vtl0_len(&ctx->layergrps); n++) del_cnt += del_layergrp(ctx, pcb_get_layergrp(ctx->pcb, ctx->layergrps.array[n]), key); for(idp = pcb_idpath_list_first(&ctx->objs); idp != NULL; idp = pcb_idpath_list_next(idp)) - del_cnt += del_any(ctx, pcb_idpath2obj(ctx->pcb->Data, idp), key); + del_cnt += del_any(ctx, pcb_idpath2obj(ctx->data, idp), key); if (ctx->selection) { pcb_any_obj_t *o; pcb_data_it_t it; - for(o = pcb_data_first(&it, ctx->pcb->Data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) + for(o = pcb_data_first(&it, ctx->data, PCB_OBJ_CLASS_REAL); o != NULL; o = pcb_data_next(&it)) if (PCB_FLAG_TEST(PCB_FLAG_SELECTED, o)) del_cnt += del_any(ctx, o, key); } Index: trunk/src_plugins/propedit/propsel.h =================================================================== --- trunk/src_plugins/propedit/propsel.h (revision 24314) +++ trunk/src_plugins/propedit/propsel.h (revision 24315) @@ -38,6 +38,7 @@ unsigned is_trace:1; unsigned is_attr:1; pcb_board_t *pcb; + pcb_data_t *data; const char *name; int set_cnt; } pcb_propset_ctx_t;