Hi Mathieu,
Thanks for the patch. It looks OK to me (I haven't tried it yet, just read). There are two issues that I see:
1 Something's wrong with the patch file: some (all?) files are listed twice
As I thought, my first patch isn't that glorious :-) Just to be sure I'll not break anything, I made a copy of my inkscape folder and it showed in the patch... So there's the new one (which works, I hope), I made it after Carl's seltrans modification so it show work well now.* *
2 I don't like having to insert desktop->namedview->reset_snapped_visual_feedback() into all contexts on mouse up. Since extra calls of this function should do no harm, I propose to do this once in event-context.cpp root handler, in case GDK_BUTTON_RELEASE unconditionally no matter which button was released (just below xp = yp = 0;). This way it will work in all tools without you having to change anything in each tool's event handlers.
I just tried that, and you're right, it's really cleaner and it works well, it's in the new patch. But think I still need to modify every context, for each start of a GDK_MOTION_NOTIFY requires a desktop->namedview->reset_snapped_visual_feedback() to downlight everything. It could be done in event-context.cpp root handler too maybe, but I would need to check every context, especially not calling the resetting when we're dragging a guide to move it (and whoops, its highlighting disappears). And I tried it, and seems not to work (select-context.cpp, line 484). Is this event being triggered after the same one in select-context ? How to make it append before ? What do you think ? Is it worth the try, having a single call while motion is triggered, with multiple cases to check ?
Next things I could look at could be :
- Snapping modes (enable/disable) Bounding box and dots snapping. I
thik it could be great too temporarily disable bounding box snapping, just to make sure only dots do it.
How do you want to do that?
Maybe some more icons in selection context, as seen on http://paris.charougna.com/inkscape/Snapping_Icons.png
It could be useful, as the object type selection mask icons in Maya or more like the "object snaps" menu in Rhino3D.
We have no shortage of snapping requests - just search our RFE tracker or this list. Personally, I think the most urgent change is to make grid snapping snap only to the visible grid lines - that is, if you zoomed out so that every 10th line is shown, snap only to those 10th lines, not to the invisible lines in between. This should take care of most of the "snapping does not work" complaints, because at most practical zooms, snapping distance is smaller than the visible distance between grid lines, and may be even smaller than a screen pixel, so people just don't realize that it's actually snapping.
I think Carl is working on that, but I could look.