GNOME Bugzilla – Bug 110957
crop tool snapping to guides broken when resizing
Last modified: 2004-12-22 21:47:04 UTC
The crop tool snaps 1px off the apropriate location of a guide. To reproduce: 1) create new image 2) create one horizontal and one vertical guide 3) zoom to 2:1 to see better 4) select the crop tool, if you start creating the area in the guide intersection, it will properly snap. 5) use the top left corner to resize the are 6) try to put the top left corner back to the guide intersection. It will snap to x-1 and y-1 though.
Fixed in CVS: 2003-04-17 Michael Natterer <mitch@gimp.org> * app/tools/gimptoolcontrol.[ch]: added an API to specify a "snap_offset" and a "snap_width/height". Needed for tools which want to snap to a rectangle and/or a position which is not the current cursor position. * app/display/gimpdisplayshell.[ch]: removed gimp_display_shell_find_guide(), gimp_display_shell_snap_point() and gimp_display_shell_snap_rectangle(). Added gimp_display_shell_snap_coords() which works on GimpCoords and gets passed the above snap offsets. * app/display/gimpdisplayshell-callbacks.c: use the new snap function, using the values from GimpToolControl. * app/tools/gimpcroptool.c: set snap offsets so the handles can be guide-aligned after creating. Fixes bug #110957. * app/tools/gimpeditselectiontool.c: removed snapping code (which was broken anyway) and set appropriate snap offsets in init_edit_selection().