Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 34483) +++ trunk/src/obj_text.c (revision 34484) @@ -1208,6 +1208,29 @@ return 0; } +int pcb_text_chg_any(pcb_text_t *text, const pcb_text_t *src, rnd_bool undoable) +{ + undo_text_geo_t gtmp, *g = >mp; + + if (undoable) g = pcb_undo_alloc(pcb_data_get_top(text->parent.layer->parent.data), &undo_text_geo, sizeof(undo_text_geo_t)); + + g->text = text; + g->X = src->X; + g->Y = src->Y; + g->Scale = src->Scale; + g->scale_x = src->scale_x; + g->scale_y = src->scale_y; + g->thickness = src->thickness; + g->clearance = src->clearance; + g->rot = src->rot; + g->fid = src->fid; + + undo_text_geo_swap(g); + if (undoable) pcb_undo_inc_serial(); + + return 0; +} + /*** draw ***/ #define MAX_SIMPLE_POLY_POINTS 256 Index: trunk/src/obj_text_op.h =================================================================== --- trunk/src/obj_text_op.h (revision 34483) +++ trunk/src/obj_text_op.h (revision 34484) @@ -56,3 +56,6 @@ /* undoable scale_x and scale_y change */ int pcb_text_chg_scale(pcb_text_t *text, double scx, rnd_bool absx, double scy, rnd_bool absy, rnd_bool undoable); + +/* undoable change of any field that differs compared to src */ +int pcb_text_chg_any(pcb_text_t *text, const pcb_text_t *src, rnd_bool undoable);