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 565046 - Point snapping to guides does not work outside the canvas
Point snapping to guides does not work outside the canvas
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Tools
git master
Other All
: Normal minor
: Future
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-12-18 22:36 UTC by quazgar
Modified: 2018-05-24 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to remove all image boundary checks (1.13 KB, patch)
2008-12-18 22:39 UTC, quazgar
none Details | Review
Patch to enable snapping outside the canvas and to fix odd behaviour there. (7.51 KB, patch)
2009-01-05 00:13 UTC, quazgar
reviewed Details | Review
A more complete patch which corrects snap, adds guides and grid outside the canvas (44.04 KB, patch)
2010-01-06 21:03 UTC, Shirakawa
needs-work Details | Review

Description quazgar 2008-12-18 22:36:10 UTC
Please describe the problem:
Snapping point-like objects (which use gimp_image_snap_point) to guides and to the grid doesn't work outside the canvas, although this might be actually desirable sometimes.

Steps to reproduce:
1. Create a new image with a guide.
2. Create a path.
3. Drag one of the path's nodes outside the canvas and try to position it exactly on the guide.

Actual results:
The node doesn't snap to the guide.

Expected results:
The node snaps to the guide.

Does this happen every time?
Happens every time.

Other information:
I first thought this was the same as bug #169892, but that one seemed to have been partly fixed already.
Comment 1 quazgar 2008-12-18 22:39:06 UTC
Created attachment 124978 [details] [review]
Patch to remove all image boundary checks

Patch implementing the proposed behaviour, tested with svn r27811.  Note that snapping to grid still does not work as expected outside the canvas with this patch.
Comment 2 Sven Neumann 2008-12-28 01:08:41 UTC
How does it not work? Does that mean that this change should not be applied?
Comment 3 quazgar 2009-01-05 00:13:26 UTC
Created attachment 125762 [details] [review]
Patch to enable snapping outside the canvas and to fix odd behaviour there.

Snapping to the grid only worked in one dimension when horizontally (x)or vertically outside the image and not at all when diagonally outside.  In this respect the previous patch was not ready to be applied yet.

This patch should take care of that problem as well.  Additionally it removes some very ugly code.
Comment 4 Sven Neumann 2009-01-06 22:58:07 UTC
Even though one could argue that we should not snap to the grid outside the canvas as it is also not visible outside the canvas, I tend to agree that this patch should be applied. Any objections anyone?
Comment 5 Sven Neumann 2009-01-06 23:02:32 UTC
After giving it some more thoughts, I have to object myself. The grid does not exist outside the image, so there should also not be any snapping to the grid. This is somewhat different for guides as we changed them to be drawn outside the canvas as well. At that point we also had to change the snapping code to snap to guides outside the canvas. So if we wanted to enable grid snapping outside the canvas, we would also have to draw the grid there. I suggest that we close this as NOTABUG.
Comment 6 Martin Nordholts 2009-01-07 08:31:21 UTC
I think we should open a new bug report for making the grid be drawn outside the canvas and make this bug report depend on that one.
Comment 7 tobias 2009-01-07 11:04:52 UTC
I'm with Martin, draw the grid outside the canvas and then add snapping.
Comment 8 quazgar 2009-01-07 16:36:36 UTC
I'm with Martin as well, but still the original issue of this bug (snapping to guides outside the canvas) remains.  And I disagree that the grid does not exist outside th canvas, it's simply not drawn there (just as the content of layers is not drawn).  The grid (as currently implemented) gets is existence from its effects not from some grid object, I think. 
Comment 9 Martin Nordholts 2009-07-21 16:00:49 UTC
Before we can snap to the area outside the canvas, we need to draw a grid there. The user needs to be able to see where things will snap.

The patch itself looks fine to me.
Comment 10 Shirakawa 2010-01-06 21:03:25 UTC
Created attachment 150930 [details] [review]
A more complete patch which corrects snap, adds guides and grid outside the canvas

This collection of patches makes the following changes:

- Guides can be created outside the canvas
- Fixed snapping outside the canvas (same as the previous Daniel Hornung's patch)
- Fixed snapping to guides having negative coordinates
- The Grid is now drawn also in the area outside the canvas
- Fixed drawing artifacts occurring on guides and grid when drawn outside the canvas, while panning the image view
Comment 11 Martin Nordholts 2010-06-23 04:48:37 UTC
Review of attachment 150930 [details] [review]:

The patch does not apply cleanly on git master any longer, sorry for letting it bitrot. Can you upload a new version please?
Comment 12 Martin Nordholts 2010-08-20 17:00:21 UTC
Putting off milestone until we get a new patch.
Comment 13 GNOME Infrastructure Team 2018-05-24 12:28:59 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/288.