11 Commits

Author SHA1 Message Date
Nyall Dawson
de9653044a Remove redundant custom enum (use Qt version instead) 2017-10-06 17:48:25 +10:00
Nyall Dawson
d65a18c5c0 Fix item snapping while resizing 2017-10-06 17:48:24 +10:00
Nyall Dawson
051ed1e156 Prevent snapping to selected items when resizing 2017-10-06 17:48:24 +10:00
Nyall Dawson
d950f17e75 Add item bounds based snapping to QgsLayoutSnapper 2017-10-06 17:48:24 +10:00
Nyall Dawson
1589b4e648 Implement some saving/restoring layout items to XML 2017-09-05 09:39:22 +10:00
Nyall Dawson
e453116101 [needs-docs] Refine snapping logic for layouts
Previously grids would always take precedence when both a grid
and guide were within tolerance of a point.

Now, guides will always take precedence - since they have been
manually set by users we make the assumption that they have
been explicitly placed at highly desirable snapping locations,
and should be selected over the general grid.

Additionally, grid snapping was previously only done if BOTH
x and y could be snapped to the grid. We now snap to the nearest
grid line for x/y separately. This means if a point is close
to a vertical grid line but not a horizontal one it will still
snap to that nearby vertical grid line.
2017-08-07 19:34:28 +10:00
Nyall Dawson
66875641a3 Hook up snap to guides menu option 2017-08-07 19:34:28 +10:00
Nyall Dawson
ef6727518d [FEATURE] Add a dock widget showing snap guides for current page
Allows creation of snap lines at specific locations, and
adjusting position of existing guides to exact coordinates
2017-08-07 19:34:28 +10:00
Nyall Dawson
0d0a3c2cdc Code refactor - split grid appearance settings into their own class 2017-08-07 19:34:28 +10:00
Nyall Dawson
5be237fdd9 Add ability for QgsLayoutSnapper to snap to grid 2017-08-07 19:34:28 +10:00
Nyall Dawson
361dd312bc Start on layout snapper 2017-08-07 19:34:28 +10:00