Bug in snapping (using pen tool)

View: New views
5 Messages — Rating Filter:   Alert me  

Bug in snapping (using pen tool)

by Arcadie M. Cracan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I've found a misbehaviour in the latest svn regarding snapping.
Using pen tool, with snap to grid enabled there are times when the first point
of a polyline drawn using the pen tool is not on the grid. I have investigated
this a little and it seems that at (random?) times the snapping gets
"postponed globally"...

I don't know why this could happen.
Does anybody have a clue?

Thanks,
   Arcadie Cracan


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Bug in snapping (using pen tool)

by Diederik van Lierop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Op Wo, 28 oktober, 2009 14:13, schreef Arcadie Cracan:
> Hello,
>
> I've found a misbehaviour in the latest svn regarding snapping.
> Using pen tool, with snap to grid enabled there are times when the first
> point
> of a polyline drawn using the pen tool is not on the grid. I have
> investigated
> this a little and it seems that at (random?) times the snapping gets
> "postponed globally"...

If this is the case then I'm the one to blame ;-). I've programmed the
snap delay. Does this also happen when you set the snap delay to zero in
the preferences? Has "always snap" been enabled for the grid?

I haven't seen this before, and I'm not able to reproduce this.

Diederik




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Bug in snapping (using pen tool)

by Arcadie M. Cracan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

În data de Miercuri 28 Octombrie 2009 03:21:40 pm Diederik van Lierop a scris:

> Op Wo, 28 oktober, 2009 14:13, schreef Arcadie Cracan:
> > Hello,
> >
> > I've found a misbehaviour in the latest svn regarding snapping.
> > Using pen tool, with snap to grid enabled there are times when the first
> > point
> > of a polyline drawn using the pen tool is not on the grid. I have
> > investigated
> > this a little and it seems that at (random?) times the snapping gets
> > "postponed globally"...
>
> If this is the case then I'm the one to blame ;-). I've programmed the
> snap delay. Does this also happen when you set the snap delay to zero in
> the preferences? Has "always snap" been enabled for the grid?

Actually, I can't seem to be reproduced on an empty page. You would have to
draw some lines. It seems to depend on zoom factor and other possible snap
targets.
Yes, I had enabled always snap to grid.

When I set the delay to zero, I can't reproduce it.

>
> I haven't seen this before, and I'm not able to reproduce this.
>
> Diederik

Thanks,
   Arcadie


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Parent Message unknown Re: Bug in snapping (using pen tool)

by Arcadie M. Cracan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

În data de Miercuri 28 Octombrie 2009 03:21:40 pm Diederik van Lierop a scris:

> Op Wo, 28 oktober, 2009 14:13, schreef Arcadie Cracan:
> > Hello,
> >
> > I've found a misbehaviour in the latest svn regarding snapping.
> > Using pen tool, with snap to grid enabled there are times when the first
> > point
> > of a polyline drawn using the pen tool is not on the grid. I have
> > investigated
> > this a little and it seems that at (random?) times the snapping gets
> > "postponed globally"...
>
> If this is the case then I'm the one to blame ;-). I've programmed the
> snap delay. Does this also happen when you set the snap delay to zero in
> the preferences? Has "always snap" been enabled for the grid?
>
> I haven't seen this before, and I'm not able to reproduce this.
>
> Diederik
Actually, it depends (as suv hinted on the irc - thanks) on the speed of the
cursor. You have to have some potential snap targets (some drawing) in order
to reproduce it:
1. Have some drawing on the canvas,
2. select the pen tool,
3. move your mouse quickly for some time,
4. click somewhere near a drawing for a new line.

You will notice that the snap indicator appears correctly on the grid, put the
line starts somewhere in between...

Arcadie


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel

Re: Bug in snapping (using pen tool)

by Diederik van Lierop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10/28/2009 02:59 PM, Arcadie Cracan wrote:

Actually, it depends (as suv hinted on the irc - thanks) on the speed of the 
cursor. You have to have some potential snap targets (some drawing) in order 
to reproduce it:
1. Have some drawing on the canvas,
2. select the pen tool,
3. move your mouse quickly for some time,
4. click somewhere near a drawing for a new line.

You will notice that the snap indicator appears correctly on the grid, put the 
line starts somewhere in between...

Confirmed and fixed by the patch below, but only if it's the same bug were talking about. I left some of my own code commented out for some reason, and re-enabling it fixes this issue.

Because it's only a minor issue and because I cannot remember why I disabled this piece of code in the first place, I propose not to include this patch in v0.47

Diederik



Index: /home/diedenrezi/eclipse/InkscapeSVN/src/event-context.cpp
===================================================================
--- /home/diedenrezi/eclipse/InkscapeSVN/src/event-context.cpp    (revision 22539)
+++ /home/diedenrezi/eclipse/InkscapeSVN/src/event-context.cpp    (working copy)
@@ -954,14 +954,14 @@
                 sp_event_context_snap_watchdog_callback(event_context->_delayed_snap_event);
             }
             break;
-        /*case GDK_BUTTON_PRESS:
+        case GDK_BUTTON_PRESS:
         case GDK_2BUTTON_PRESS:
         case GDK_3BUTTON_PRESS:
             // Snapping will be on hold if we're moving the mouse at high speeds. When starting
             // drawing a new shape we really should snap though.
             event_context->desktop->namedview->snap_manager.snapprefs.setSnapPostponedGlobally(false);
             break;
-        */
+
         default:
             break;
     }


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...
https://lists.sourceforge.net/lists/listinfo/inkscape-devel