Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 12184) +++ trunk/src/move.c (revision 12185) @@ -65,6 +65,23 @@ pcb_subcop_move }; +pcb_opfunc_t MoveFunctions_noclip = { + pcb_lineop_move_noclip, + pcb_textop_move_noclip, + pcb_polyop_move_noclip, + pcb_viaop_move_noclip, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + pcb_arcop_move_noclip, + NULL, + NULL, + NULL +}; + static pcb_opfunc_t MoveToLayerFunctions = { pcb_lineop_move_to_layer, pcb_textop_move_to_layer, Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 12184) +++ trunk/src/obj_arc.c (revision 12185) @@ -530,9 +530,8 @@ } /* moves an arc */ -void *pcb_arcop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) +void *pcb_arcop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) { - pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); pcb_r_delete_entry(Layer->arc_tree, (pcb_box_t *) Arc); if (Layer->meta.real.vis) { pcb_arc_invalidate_erase(Arc); @@ -544,8 +543,15 @@ pcb_arc_move(Arc, ctx->move.dx, ctx->move.dy); } pcb_r_insert_entry(Layer->arc_tree, (pcb_box_t *) Arc, 0); + return Arc; +} + +void *pcb_arcop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc) +{ + pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); + return pcb_arcop_move_noclip(ctx, Layer, Arc); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - return (Arc); + return Arc; } /* moves an arc between layers; lowlevel routines */ Index: trunk/src/obj_arc_op.h =================================================================== --- trunk/src/obj_arc_op.h (revision 12184) +++ trunk/src/obj_arc_op.h (revision 12185) @@ -39,6 +39,7 @@ void *pcb_arcop_clear_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc); void *pcb_arcop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc); void *pcb_arcop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc); +void *pcb_arcop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc); void *pcb_arcop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_arc_t * arc, pcb_layer_t * Destination); void *pcb_arcop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_arc_t * Arc); void *pcb_arcop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_arc_t *Arc); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 12184) +++ trunk/src/obj_line.c (revision 12185) @@ -488,22 +488,28 @@ } /* moves a line */ -void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) +void *pcb_lineop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) { if (Layer->meta.real.vis) pcb_line_invalidate_erase(Line); - pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); pcb_r_delete_entry(Layer->line_tree, (pcb_box_t *) Line); pcb_line_move(Line, ctx->move.dx, ctx->move.dy); pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); - pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); if (Layer->meta.real.vis) { pcb_line_invalidate_draw(Layer, Line); pcb_draw(); } - return (Line); + return Line; } +void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line) +{ + pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); + pcb_lineop_move_noclip(ctx, Layer, Line); + pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); + return Line; +} + /* moves one end of a line */ void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) { Index: trunk/src/obj_line_op.h =================================================================== --- trunk/src/obj_line_op.h (revision 12184) +++ trunk/src/obj_line_op.h (revision 12185) @@ -39,6 +39,7 @@ void *pcb_lineop_move_to_buffer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_line_t * line); void *pcb_lineop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); +void *pcb_lineop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line); void *pcb_lineop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); void *pcb_lineop_move_point_with_route(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point); void *pcb_lineop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_line_t * line, pcb_layer_t * Destination); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 12184) +++ trunk/src/obj_pinvia.c (revision 12185) @@ -836,22 +836,28 @@ } /* moves a via */ -void *pcb_viaop_move(pcb_opctx_t *ctx, pcb_pin_t *Via) +void *pcb_viaop_move_noclip(pcb_opctx_t *ctx, pcb_pin_t *Via) { pcb_r_delete_entry(PCB->Data->via_tree, (pcb_box_t *) Via); - pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); pcb_via_move(Via, ctx->move.dx, ctx->move.dy); if (PCB->ViaOn) pcb_via_invalidate_erase(Via); pcb_r_insert_entry(PCB->Data->via_tree, (pcb_box_t *) Via, 0); - pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); if (PCB->ViaOn) { pcb_via_invalidate_draw(Via); pcb_draw(); } - return (Via); + return Via; } +void *pcb_viaop_move(pcb_opctx_t *ctx, pcb_pin_t *Via) +{ + pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); + pcb_viaop_move_noclip(ctx, Via); + pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_VIA, Via, Via); + return Via; +} + /* destroys a via */ void *pcb_viaop_destroy(pcb_opctx_t *ctx, pcb_pin_t *Via) { Index: trunk/src/obj_pinvia_op.h =================================================================== --- trunk/src/obj_pinvia_op.h (revision 12184) +++ trunk/src/obj_pinvia_op.h (revision 12185) @@ -56,6 +56,7 @@ void *pcb_viaop_change_mask_size(pcb_opctx_t *ctx, pcb_pin_t *Via); void *pcb_viaop_copy(pcb_opctx_t *ctx, pcb_pin_t *Via); void *pcb_viaop_move(pcb_opctx_t *ctx, pcb_pin_t *Via); +void *pcb_viaop_move_noclip(pcb_opctx_t *ctx, pcb_pin_t *Via); void *pcb_viaop_destroy(pcb_opctx_t *ctx, pcb_pin_t *Via); void *pcb_viaop_remove(pcb_opctx_t *ctx, pcb_pin_t *Via); void *pcb_viaop_change_flag(pcb_opctx_t *ctx, pcb_pin_t *pin); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 12184) +++ trunk/src/obj_poly.c (revision 12185) @@ -531,9 +531,8 @@ } /* moves a polygon */ -void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon) +void *pcb_polyop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon) { - pcb_poly_pprestore(Polygon); if (Layer->meta.real.vis) { pcb_poly_invalidate_erase(Polygon); } @@ -545,8 +544,15 @@ pcb_poly_invalidate_draw(Layer, Polygon); pcb_draw(); } + return Polygon; +} + +void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon) +{ + pcb_poly_pprestore(Polygon); + pcb_polyop_move_noclip(ctx, Layer, Polygon); pcb_poly_ppclear(Polygon); - return (Polygon); + return Polygon; } /* moves a polygon-point */ Index: trunk/src/obj_poly_op.h =================================================================== --- trunk/src/obj_poly_op.h (revision 12184) +++ trunk/src/obj_poly_op.h (revision 12185) @@ -34,6 +34,7 @@ void *pcb_polyop_change_clear(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon); void *pcb_polyop_insert_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon); void *pcb_polyop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon); +void *pcb_polyop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon); void *pcb_polyop_move_point(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_polygon_t *Polygon, pcb_point_t *Point); void *pcb_polyop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_polygon_t * polygon, pcb_layer_t * Destination); void *pcb_polyop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * Layer, pcb_polygon_t * Polygon); Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 12184) +++ trunk/src/obj_text.c (revision 12185) @@ -452,9 +452,8 @@ } /* moves a text object */ -void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +void *pcb_textop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) { - pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); pcb_r_delete_entry(Layer->text_tree, (pcb_box_t *) Text); if (Layer->meta.real.vis) { pcb_text_invalidate_erase(Layer, Text); @@ -465,6 +464,13 @@ else pcb_text_move(Text, ctx->move.dx, ctx->move.dy); pcb_r_insert_entry(Layer->text_tree, (pcb_box_t *) Text, 0); + return Text; +} + +void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text) +{ + pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); + pcb_textop_move_noclip(ctx, Layer, Text); pcb_poly_clear_from_poly(PCB->Data, PCB_TYPE_TEXT, Layer, Text); return (Text); } Index: trunk/src/obj_text_op.h =================================================================== --- trunk/src/obj_text_op.h (revision 12184) +++ trunk/src/obj_text_op.h (revision 12185) @@ -37,6 +37,7 @@ void *pcb_textop_clear_join(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); void *pcb_textop_copy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); void *pcb_textop_move(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); +void *pcb_textop_move_noclip(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text); void *pcb_textop_move_to_layer_low(pcb_opctx_t *ctx, pcb_layer_t * Source, pcb_text_t * text, pcb_layer_t * Destination); void *pcb_textop_move_to_layer(pcb_opctx_t *ctx, pcb_layer_t * layer, pcb_text_t * text); void *pcb_textop_destroy(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_text_t *Text);