Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 31219) +++ trunk/src/brave.c (revision 31220) @@ -54,7 +54,6 @@ {PCB_BRAVE_NOXOR, "noxor", "avoid xor drawing", "use alternative rendering instead of xor draw", 0}, {PCB_BRAVE_NOCLIPBATCH, "noclipbatch", "do not batch poly clipping", "skip optimization of batching polygon clipping in some expensive user operations", 0}, {PCB_BRAVE_LESSTIF_TREETABLE, "lesstifttbl", "lesstif tree table", "enable experimental lesstif tree table support", 0}, - {PCB_BRAVE_OLDINSERT, "oldinsert", "old insert tool", "revert back to the old insert tool", 0}, {0, NULL, NULL, NULL} }; Index: trunk/src/brave.h =================================================================== --- trunk/src/brave.h (revision 31219) +++ trunk/src/brave.h (revision 31220) @@ -5,7 +5,6 @@ PCB_BRAVE_NOXOR = 1, PCB_BRAVE_NOCLIPBATCH = 2, PCB_BRAVE_LESSTIF_TREETABLE = 4, - PCB_BRAVE_OLDINSERT = 8, PCB_BRAVE_max } pcb_brave_t; Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 31219) +++ trunk/src/insert.c (revision 31220) @@ -37,7 +37,6 @@ #include "data.h" #include "select.h" #include "undo.h" -#include "brave.h" #include "obj_line_op.h" #include "obj_arc_op.h" @@ -83,75 +82,8 @@ rnd_point_t *pcb_adjust_insert_point(void) { static rnd_point_t InsertedPoint; - double m; - rnd_coord_t x, y, m1, m2; - pcb_line_t *line = (pcb_line_t *) pcb_crosshair.AttachedObject.Ptr2; - if (!(pcb_brave & PCB_BRAVE_OLDINSERT)) { - InsertedPoint.X = pcb_crosshair.X; - InsertedPoint.Y = pcb_crosshair.Y; - return &InsertedPoint; - } - - if (pcb_crosshair.AttachedObject.State == PCB_CH_STATE_FIRST) - return NULL; - pcb_crosshair.AttachedObject.Ptr3 = &InsertedPoint; - if (rnd_gui->shift_is_pressed(rnd_gui)) { - pcb_attached_line_t myline; - /* only force 45 degree for nearest point */ - if (rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point1.X, line->Point1.Y) < - rnd_distance(pcb_crosshair.X, pcb_crosshair.Y, line->Point2.X, line->Point2.Y)) - myline.Point1 = myline.Point2 = line->Point1; - else - myline.Point1 = myline.Point2 = line->Point2; - pcb_line_45(&myline); - InsertedPoint.X = myline.Point2.X; - InsertedPoint.Y = myline.Point2.Y; - return &InsertedPoint; - } - if (PCB->RatDraw || conf_core.editor.all_direction_lines) { - InsertedPoint.X = pcb_crosshair.X; - InsertedPoint.Y = pcb_crosshair.Y; - return &InsertedPoint; - } - if (pcb_crosshair.X == line->Point1.X) - m1 = 2; /* 2 signals infinite slope */ - else { - m = (double) (pcb_crosshair.Y - line->Point1.Y) / (pcb_crosshair.X - line->Point1.X); - m1 = 0; - if (m > RND_TAN_30_DEGREE) - m1 = (m > RND_TAN_60_DEGREE) ? 2 : 1; - else if (m < -RND_TAN_30_DEGREE) - m1 = (m < -RND_TAN_60_DEGREE) ? 2 : -1; - } - if (pcb_crosshair.X == line->Point2.X) - m2 = 2; /* 2 signals infinite slope */ - else { - m = (double) (pcb_crosshair.Y - line->Point2.Y) / (pcb_crosshair.X - line->Point2.X); - m2 = 0; - if (m > RND_TAN_30_DEGREE) - m2 = (m > RND_TAN_60_DEGREE) ? 2 : 1; - else if (m < -RND_TAN_30_DEGREE) - m2 = (m < -RND_TAN_60_DEGREE) ? 2 : -1; - } - if (m1 == m2) { - InsertedPoint.X = line->Point1.X; - InsertedPoint.Y = line->Point1.Y; - return &InsertedPoint; - } - if (m1 == 2) { - x = line->Point1.X; - y = line->Point2.Y + m2 * (line->Point1.X - line->Point2.X); - } - else if (m2 == 2) { - x = line->Point2.X; - y = line->Point1.Y + m1 * (line->Point2.X - line->Point1.X); - } - else { - x = (line->Point2.Y - line->Point1.Y + m1 * line->Point1.X - m2 * line->Point2.X) / (m1 - m2); - y = (m1 * line->Point2.Y - m1 * m2 * line->Point2.X - m2 * line->Point1.Y + m1 * m2 * line->Point1.X) / (m1 - m2); - } - InsertedPoint.X = x; - InsertedPoint.Y = y; + InsertedPoint.X = pcb_crosshair.X; + InsertedPoint.Y = pcb_crosshair.Y; return &InsertedPoint; } Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 31219) +++ trunk/src/obj_line.c (revision 31220) @@ -34,7 +34,6 @@ #include "undo.h" #include "board.h" -#include "brave.h" #include "data.h" #include "move.h" #include "search.h" @@ -1082,10 +1081,7 @@ * invalidate the line pointer */ - if (pcb_brave & PCB_BRAVE_OLDINSERT) - line = pcb_line_new_merge(Layer, ctx->insert.x, ctx->insert.y, X, Y, Line->Thickness, Line->Clearance, Line->Flags); - else - line = pcb_line_new(Layer, ctx->insert.x, ctx->insert.y, X, Y, Line->Thickness, Line->Clearance, Line->Flags); + line = pcb_line_new(Layer, ctx->insert.x, ctx->insert.y, X, Y, Line->Thickness, Line->Clearance, Line->Flags); if (line) { pcb_line_copy_meta(line, Line); Index: trunk/src_plugins/tool_std/tool_insert.c =================================================================== --- trunk/src_plugins/tool_std/tool_insert.c (revision 31219) +++ trunk/src_plugins/tool_std/tool_insert.c (revision 31220) @@ -39,7 +39,6 @@ #include "insert.h" #include "polygon.h" #include "search.h" -#include "brave.h" #include @@ -88,7 +87,7 @@ pcb_crosshair.AttachedObject.Ptr2 = &fake.line; } - if (!(pcb_brave & PCB_BRAVE_OLDINSERT)) { + { InsertedPoint = *pcb_adjust_insert_point(); pcb_crosshair_set_local_ref(InsertedPoint.X, InsertedPoint.Y, rnd_true); if (pcb_crosshair.AttachedObject.Type == PCB_OBJ_POLY) @@ -105,10 +104,6 @@ pcb_crosshair.AttachedObject.State = PCB_CH_STATE_FIRST; pcb_crosshair.extobj_edit = NULL; } - else { - pcb_crosshair.AttachedObject.State = PCB_CH_STATE_SECOND; - InsertedPoint = *pcb_adjust_insert_point(); - } } } break;