Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 8957) +++ trunk/src/obj_line.c (revision 8958) @@ -487,29 +487,24 @@ pcb_route_t route; pcb_point_t point1 = (&Line->Point1 == Point ? Line->Point2 : Line->Point1); pcb_point_t point2 = *Point; - pcb_coord_t thickness = Line->Thickness; - pcb_coord_t clearance = Line->Clearance; - pcb_flag_t flags = Line->Flags; point2.X += ctx->move.dx; point2.Y += ctx->move.dy; - if((point1.X != point2.X) || (point1.Y != point2.Y)) { - /* Calculate the new line route and add apply it */ - pcb_route_init(&route); - pcb_route_calculate(PCB, - &route, - &point1, - &point2, - pcb_layer_id(PCB->Data,Layer), - thickness, - clearance, - flags, - pcb_gui->shift_is_pressed(), - pcb_gui->control_is_pressed() ); - pcb_route_apply_to_line(&route,Layer,Line); - pcb_route_destroy(&route); - } + /* Calculate the new line route and add apply it */ + pcb_route_init(&route); + pcb_route_calculate(PCB, + &route, + &point1, + &point2, + pcb_layer_id(PCB->Data,Layer), + Line->Thickness, + Line->Clearance, + Line->Flags, + pcb_gui->shift_is_pressed(), + pcb_gui->control_is_pressed() ); + pcb_route_apply_to_line(&route,Layer,Line); + pcb_route_destroy(&route); pcb_draw(); } Index: trunk/src/route.c =================================================================== --- trunk/src/route.c (revision 8957) +++ trunk/src/route.c (revision 8958) @@ -349,10 +349,18 @@ route->PCB = PCB; route->flags = flags; + /* If the start point is the same as the end point then add a single 0-length line. + * If a 0-length line is not added then some operations such as moving a line point + * could cause the line to disappear. + */ + if((point1->X == point2->X) && (point1->Y == point2->Y)) { + route->end_point = *point2; + pcb_route_add_line(route,point1,point2,layer_id); + } /* If Refraction is 0 then add a single line segment that is horizontal, vertical or 45 degrees. * This line segment might not end under the crosshair. */ - if(conf_core.editor.line_refraction == 0) { + else if(conf_core.editor.line_refraction == 0) { pcb_point_t target = *point2; pcb_route_calculate_45(point1,&target); pcb_route_add_line(route,point1,&target,layer_id);