Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 13107) +++ trunk/src/crosshair.c (revision 13108) @@ -1344,8 +1344,24 @@ pcb_crosshair.snapped_pin = pin; } + /*** padstack center ***/ ans = PCB_TYPE_NONE; if (conf_core.editor.snap_pin) + ans = pcb_search_grid_slop(pcb_crosshair.X, pcb_crosshair.Y, PCB_TYPE_PSTK | PCB_TYPE_SUBC_PART, &ptr1, &ptr2, &ptr3); + + /* Avoid snapping padstack to any other vias */ + if (conf_core.editor.mode == PCB_MODE_MOVE && pcb_crosshair.AttachedObject.Type == PCB_TYPE_VIA && (ans & PCB_TYPEMASK_PIN)) + ans = PCB_TYPE_NONE; + + if (ans != PCB_TYPE_NONE) { + pcb_pstk_t *ps = (pcb_pstk_t *) ptr2; + check_snap_object(&snap_data, ps->x, ps->y, pcb_true); + pcb_crosshair.snapped_pstk = ps; + } + + /*** arc ***/ + ans = PCB_TYPE_NONE; + if (conf_core.editor.snap_pin) ans = pcb_search_grid_slop(pcb_crosshair.X, pcb_crosshair.Y, PCB_TYPE_LINE_POINT | PCB_TYPE_ARC_POINT | PCB_TYPE_SUBC_PART, &ptr1, &ptr2, &ptr3); if (ans == PCB_TYPE_ARC_POINT) { Index: trunk/src/crosshair.h =================================================================== --- trunk/src/crosshair.h (revision 13107) +++ trunk/src/crosshair.h (revision 13108) @@ -83,6 +83,7 @@ vtop_t old_onpoint_objs; pcb_pad_t *snapped_pad; pcb_pin_t *snapped_pin; + pcb_pstk_t *snapped_pstk; /* list of object IDs that could have been dragged so that they can be cycled */ long int *drags;