← Back to team overview

kicad-developers team mailing list archive

Re: Is snap-to-grid zoom-level dependant?

 

Hi Seth,

I think I actually prefer (1), but I don’t feel strongly.  (When you do get things off grid, it can be maddeningly hard to get them back on.  I think both the arrow keys and dragging do (2) now.) 

Cheers,
Jeff.

> On 20 Oct 2018, at 21:56, Seth Hillbrand <seth@xxxxxxxxxxxxx> wrote:
> 
> Am 2018-10-20 15:39, schrieb Jeff Young:
>> Hi Seth,
>> Yes, sorry, graphic items.
>> The problem is the initial snap.  Let’s say I have an item at [100,
>> 25] and my snap/zoom resolution is currently set to 2.  If I right
>> arrow key then I’m expecting [102, 25] but what I get is [102, 24] (or
>> maybe [102, 26] depending on rounding).  That move on the Y-axis in
>> response to an X-axis keystroke is what’s annoying.
> 
> OK, I think I see what is happening.  If you start with a graphical item that is off-grid, highlight it, press 'm' and then use the arrow keys to move it, the anchor point will snap to grid points.  Since you are off-grid, this will cause the item to move both in the direction of the arrow key as well as perpendicular to the closest point.
> 
> I can think of a few different "correct" behaviors here.
> 1) Move in the direction of the arrow key to the closest grid _line_ but do not move perpendicular.
>  - Second press in the same direction steps by the grid distance.
> 2) Move in the direction of the arrow key by the grid size distance (so staying on the grid defined by the origin)
> 3) Move in the direction of the arrow key stopping at _both_ the grid lines for the absolute and origin-relative steps.
> 
> Personally, I like (3) best.  But you are correct, we shouldn't be moving perpendicular.  I'll code up a fix.
> 
>> BTW: did either you or Wayne get a chance to try out the
>> escaping-labels-and-netnames patch?
> 
> I looked it over and didn't see obvious issues but I'd like to play with it a bit more and try to find any corners.
> 
> Best-
> Seth



Follow ups

References