Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 13195) +++ trunk/src/obj_line.c (revision 13196) @@ -514,11 +514,11 @@ { if (ctx->clip.restore) { pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); - pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); + pcb_poly_restore_to_poly(ctx->clip.pcb->Data, PCB_TYPE_LINE, Layer, Line); } if (ctx->clip.clear) { pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); - pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); + pcb_poly_clear_from_poly(ctx->clip.pcb->Data, PCB_TYPE_LINE, Layer, Line); } return Line; } Index: trunk/src/obj_subc.c =================================================================== --- trunk/src/obj_subc.c (revision 13195) +++ trunk/src/obj_subc.c (revision 13196) @@ -906,6 +906,7 @@ /* restore all pins/pads at once, at the old location */ clip.clip.restore = 1; clip.clip.clear = 0; + clip.clip.pcb = ctx->move.pcb; pcb_subc_op(data, sc, &ClipFunctions, &clip); /* do the move without messing with the clipping */ Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 13195) +++ trunk/src/operation.h (revision 13196) @@ -109,6 +109,7 @@ } pcb_opctx_noarg_t; typedef struct { + pcb_board_t *pcb; int restore; int clear; } pcb_opctx_clip_t;