Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 27113) +++ trunk/src/crosshair.c (revision 27114) @@ -65,7 +65,8 @@ } point; pcb_crosshair_t pcb_crosshair; /* information about cursor settings */ -pcb_mark_t pcb_marked; /* a cross-hair mark */ +pcb_mark_t pcb_marked; +pcb_mark_t pcb_grabbed; static void thindraw_moved_ps(pcb_pstk_t *ps, pcb_coord_t x, pcb_coord_t y) { @@ -866,12 +867,12 @@ nearest_grid_y = pcb_grid_fit(pcb_crosshair.Y, PCB->hidlib.grid, PCB->hidlib.grid_oy); if (pcb_marked.status && conf_core.editor.orthogonal_moves) { - pcb_coord_t dx = pcb_crosshair.X - pcb_marked.X; - pcb_coord_t dy = pcb_crosshair.Y - pcb_marked.Y; + pcb_coord_t dx = pcb_crosshair.X - pcb_grabbed.X; + pcb_coord_t dy = pcb_crosshair.Y - pcb_grabbed.Y; if (PCB_ABS(dx) > PCB_ABS(dy)) - nearest_grid_y = pcb_marked.Y; + nearest_grid_y = pcb_grabbed.Y; else - nearest_grid_x = pcb_marked.X; + nearest_grid_x = pcb_grabbed.X; } } Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 27113) +++ trunk/src/crosshair.h (revision 27114) @@ -88,7 +88,8 @@ #define PCB_CH_STATE_THIRD 2 extern pcb_crosshair_t pcb_crosshair; -extern pcb_mark_t pcb_marked; +extern pcb_mark_t pcb_marked; /* the point the user explicitly marked, or in some operations where the operation originally started */ +extern pcb_mark_t pcb_grabbed; /* point where a drag&drop operation started */ void pcb_notify_crosshair_change(pcb_bool changes_complete); void pcb_notify_mark_change(pcb_bool changes_complete); Index: trunk/src/tool.c =================================================================== --- trunk/src/tool.c (revision 27113) +++ trunk/src/tool.c (revision 27114) @@ -431,6 +431,9 @@ if (pcbhl_conf.temp.click_cmd_entry_active && (pcb_cli_mouse(1) == 0)) return; + pcb_grabbed.X = pcb_crosshair.X; + pcb_grabbed.Y = pcb_crosshair.Y; + if (conf_core.temp.rat_warn) { if (pcb_data_clear_flag(PCB->Data, PCB_FLAG_WARN, 1, 0) > 0) pcb_board_set_changed_flag(pcb_true); Index: trunk/src/tool_poly.c =================================================================== --- trunk/src/tool_poly.c (revision 27113) +++ trunk/src/tool_poly.c (revision 27114) @@ -87,10 +87,9 @@ } if (conf_core.editor.orthogonal_moves) { -TODO("mark: remove this"); /* set the mark to the new starting point so ortho works */ - pcb_marked.X = pcb_tool_note.X; - pcb_marked.Y = pcb_tool_note.Y; + pcb_grabbed.X = pcb_tool_note.X; + pcb_grabbed.Y = pcb_tool_note.Y; } } Index: trunk/src/tool_polyhole.c =================================================================== --- trunk/src/tool_polyhole.c (revision 27113) +++ trunk/src/tool_polyhole.c (revision 27114) @@ -88,10 +88,9 @@ } if (conf_core.editor.orthogonal_moves) { -TODO("mark: remove this"); /* set the mark to the new starting point so ortho works */ - pcb_marked.X = pcb_tool_note.X; - pcb_marked.Y = pcb_tool_note.Y; + pcb_grabbed.X = pcb_tool_note.X; + pcb_grabbed.Y = pcb_tool_note.Y; } /* check if this is the last point of a polygon */