GNOME Bugzilla – Bug 169892
Wrong Guides Snap Behavior?
Last modified: 2008-12-18 20:16:17 UTC
Distribution/Version: Debian when setting snap to guides, you can only snap to a guide when the pointer is inside the canvas.. which makes snapping to a box that ends in the border of the canvas hard. If i have two horizontal guides and then i want to select-snap until the right side of the screen, the snapping is lost when the cursor goes out, making me have to be extra careful to make sure I am making a selection that includes the border pixels.
The position of the pointer doesn't matter - the magnetic pull of guides (or the magnetic canvas edges in 2.3, if they are activated) doesn't extend beyond the canvas boundary.
That shoule be a really easy one. Adding the gnome-love keyword.
Created attachment 39692 [details] [review] Proposed patch Removed boundary checks.
Next time, please create a unified diff (diff -u). Those are easier to read.
The patch is correct and would work, however I decided to just change the boundary checks to include the passed epsilon values: 2005-04-19 Michael Natterer <mitch@gimp.org> * app/core/gimpimage-snap.c: bail out early if the coords are out-of-image plus a border of the snapping epsilon, and not just out-of-image. Fixes bug #169892.
I think your solution doesn't cover all use cases: There are cases where snapping is needed although the object in question is outside the image. For me this happened with path nodes, which had to be on guides even though they were outside. The same may apply if for some reason one needs to continue painting along a guide (or other snapping object) across the image boundary. Therefore I think that the boundary checks should be removed. Without any actual profiling I doubt they have any positive effect anyway, since any movements outside the canvas should need less cpu anyway, correct?
Created attachment 124934 [details] [review] Patch to remove all image boundary checks Patch implementing the proposed behaviour, tested with svn r27772.
Please open a new bug for this patch.