Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 5301) +++ trunk/src/obj_line.c (revision 5302) @@ -687,6 +687,7 @@ /* rotates a line's point */ void *RotateLinePoint(pcb_opctx_t *ctx, pcb_layer_t *Layer, pcb_line_t *Line, pcb_point_t *Point) { + pcb_point_t *center; EraseLine(Line); if (Layer) { pcb_poly_restore_to_poly(PCB->Data, PCB_TYPE_LINE, Layer, Line); @@ -694,7 +695,13 @@ } else pcb_r_delete_entry(PCB->Data->rat_tree, (pcb_box_t *) Line); - pcb_point_rotate90(Point, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); + + if ((Point->X == Line->Point1.X) && (Point->Y == Line->Point1.Y)) + center = &Line->Point2; + else + center = &Line->Point1; + + pcb_point_rotate90(Point, center->X, center->Y, ctx->rotate.number); pcb_line_bbox(Line); if (Layer) { pcb_r_insert_entry(Layer->line_tree, (pcb_box_t *) Line, 0); Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 5301) +++ trunk/src/rotate.h (revision 5302) @@ -52,7 +52,7 @@ } \ } while(0) -#define PCB_ROTATE_TYPES (PCB_TYPE_ELEMENT | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_ARC) +#define PCB_ROTATE_TYPES (PCB_TYPE_ELEMENT | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_ARC | PCB_TYPE_LINE_POINT) void *pcb_obj_rotate90(int, void *, void *, void *, pcb_coord_t, pcb_coord_t, unsigned); void pcb_screen_obj_rotate90(pcb_coord_t, pcb_coord_t, unsigned);