Bezier tool first node sometimes fails to snap to grid

Bug #610680 reported by eigenperson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Unassigned

Bug Description

When creating paths of straight lines with the Bezier tool, the first node doesn't always snap to the grid, even when snap to grid is set. By "not always" I mean that sometimes it does and sometimes it doesn't, without any changes to the settings, and I can't figure out why. This also happens with other tools, but I am most familiar with the problem when it occurs with the Bezier tool, so that is what I'll describe.

In Inkscape 0.47 on Windows Vista Home Basic:

1. Create a new document
2. Make a rectangular grid. Make it visible and Set X and Y spacing to 10 pixels. In the snap tab, set "Snap to grid" to "Always snap."
3. In the snap toolbar, make sure that snapping and snapping to grid are on, and that "snap nodes" is on. Nothing else should be on.
4. Zoom in very closely, so that a single grid square nearly fills the screen.
5. Click the Bezier tool and select "Create a sequence of straight line segments." Set the stroke width to 1 px.
5. Create a path consisting of a single line segment from the bottom right corner of a grid square to the top left corner of the same square.
6. Move the cursor so it is on top of the previously created path and near the center of the grid square.
7. Click the mouse button. The snap indicator will appear at one of the corners of the grid square. However, sometimes the newly created path node doesn't appear at that corner, but rather at the actual location of the cursor (in other words, it doesn't snap). You can notice this because no square node indicator appears at the corner where the snap indicator appears. If you now click anywhere and press Return, a path will be created with one end not snapped to the grid. (Note: If the node does snap properly the first time, press Return, move the mouse by a tiny fraction, and try again. I usually can produce the bug within 4-5 tries.)

Of course, the bug also appears with lines of different slopes and lengths, with grids of different sizes, and so on. It will also occur if you replace the Bezier paths with rectangles; although the instructions for reproducing it would then be somewhat different, the method is basically the same. I haven't tried other shapes.

I've attached a file created using the above instructions.

Tags: snapping

Related branches

Revision history for this message
eigenperson (anonymouskaward) wrote :
su_v (suv-lp)
tags: added: snapping
Revision history for this message
su_v (suv-lp) wrote :

Reproduced with Inkscape 0.47 on OS X 10.5.8:
Can't really tell what triggers the error - it doesn't happen every time, and might be related to drawing speed (time between mouse clicks).

Not reproduced with Inkscape 0.48+devel r9661 on OS X 10.5.8:
Possibly fixed in rev 9015
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/9015>
See also <http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/31990>

Proposing to close as 'Fix committed' (for 0.48)

Revision history for this message
eigenperson (anonymouskaward) wrote :

Yes, this is the same bug as the one reported by Arcadie Cracan. I guess I should have thought about checking the developers' mailing list.

Anyway, that fix seems to work, so I guess you can close this one up.

Thanks for the prompt attention; I really appreciate it :)

Revision history for this message
su_v (suv-lp) wrote :

@Diederik - could you comment on the status of this bug in trunk/0.48 branch?

Revision history for this message
Diederik van Lierop (mail-diedenrezi) wrote :

It could also be that this has been fixed in rev. #9105, instead of in rev. #9015. Or was that a typo of you ~suv, because these numbers look surprisingly similar ;-)

Anyway, in both cases this means that this fix will be included in v0.48

Revision history for this message
su_v (suv-lp) wrote :

Actually I did mean r9015 - AFAICT it includes the diff that you proposed in the discussion on inkscape-devel but did not commit at the time (to close before the release of 0.47).

<http://article.gmane.org/gmane.comp.graphics.inkscape.devel/32019>

Changed in inkscape:
milestone: none → 0.48
status: New → Fix Committed
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.