Bug report #8943

Problems with "Snap to alignments" in Map Composer

Added by Leszek Pawlowicz about 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Nyall Dawson
Category:Map Composer/Printing
Affected QGIS version:2.0.1 Regression?:No
Operating System:Windows 7 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17610

Description

When "Snap to alignments" is enabled, and I move an element that has a frame to the edge of the page, the snapping will position the frame off the page, so that it doesn't show up when printed, or exported as an image. I have to turn off "Snap ..." and move the element manually to keep all of the frame on the page.

test.png (39.4 KB) Nyall Dawson, 2013-10-24 02:21 PM

snap_to_page_border-thickness_involved.png (51.5 KB) Mathieu Pellerin - nIRV, 2013-10-28 01:40 AM

snap_to_items-no_thickness_involved.png (21.1 KB) Mathieu Pellerin - nIRV, 2013-10-28 01:40 AM

Associated revisions

Revision 78ecef6f
Added by Nyall Dawson almost 6 years ago

[composer] Draw mouse handles and item bounds outside of item's frames, so that snapping occurs to edge of item frame (fix #8943)

History

#1 Updated by Nyall Dawson about 6 years ago

  • File test.png added
  • Status changed from Open to Feedback

Do you mean that only half of the frame's border is cut off? (ie, the part of that border which falls outside of the page bounds? - see attached image).

If so, I'd argue that this is expected behaviour. I get the same behaviour in Illustrator and Inkscape. Possibly what could/should be added is a way of exporting an entire composition, including elements which fall outside of the page bounds. Thoughts?

#2 Updated by Leszek Pawlowicz about 6 years ago

I would think that if you specify a frame as a part of an object, and you snap the object to an edge or another object, that all parts of the object should still appear. Otherwise, the object isn't truly snapping to an edge, it's going over and overlapping the edge, and that's not usually desirable.

#3 Updated by Mathieu Pellerin - nIRV about 6 years ago

On my Windows, using latest QGIS master build, here's the current behavior:
- When snapping to border, the frame thickness of the item being dragged is taken into account (see snap_to_page_border-thickness_involved.png); while
- When snapping to another item on the composer sheet, the frame thickness of neither the item being dragged or the other item its being snapped to is taken into account (see snap_to_items-no_thickness_involved.png)

IMO, it's a an acceptable default behavior. That said, Inkscape does seem to take into consideration the border thickness when aligning / snapping items together along edges. Is there a need for a configuration checkbox here? Or should Inkscape behavior (considering thickness at all times) but applied?

#4 Updated by Mathieu Pellerin - nIRV about 6 years ago

actually the more I think about it the more I believe frame thickness should be taken into account on all snapping scenarios.

Check the item on item snapping screenshot, you'll clearly see the item dragged snaps at end of frame thickness while item edge used for snapping ignores thickness.

#5 Updated by Nyall Dawson almost 6 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority
  • Assignee set to Nyall Dawson

#6 Updated by Nyall Dawson almost 6 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF