After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 169892 - Wrong Guides Snap Behavior?
Wrong Guides Snap Behavior?
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-03-10 23:41 UTC by Juan Rojo
Modified: 2008-12-18 20:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (481 bytes, patch)
2005-04-04 23:23 UTC, Samuel Abels
none Details | Review
Patch to remove all image boundary checks (1.13 KB, patch)
2008-12-18 16:21 UTC, quazgar
none Details | Review

Description Juan Rojo 2005-03-10 23:41:01 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.
Comment 1 Michael Schumacher 2005-03-27 11:41:33 UTC
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.
Comment 2 Michael Natterer 2005-03-28 21:07:00 UTC
That shoule be a really easy one. Adding the gnome-love keyword.
Comment 3 Samuel Abels 2005-04-04 23:23:14 UTC
Created attachment 39692 [details] [review]
Proposed patch

Removed boundary checks.
Comment 4 Sven Neumann 2005-04-04 23:28:41 UTC
Next time, please create a unified diff (diff -u). Those are easier to read.
Comment 5 Michael Natterer 2005-04-19 19:58:42 UTC
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.
Comment 6 quazgar 2008-12-18 16:16:25 UTC
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?
Comment 7 quazgar 2008-12-18 16:21:39 UTC
Created attachment 124934 [details] [review]
Patch to remove all image boundary checks

Patch implementing the proposed behaviour, tested with svn r27772.
Comment 8 Michael Schumacher 2008-12-18 20:16:17 UTC
Please open a new bug for this patch.