Commit 43e0ea8d authored by Jean Bréfort's avatar Jean Bréfort

Fix snap to grid for one cell or basolute anchored objects. [#754792]

parent 8057cc86
2015-09-11 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-object.c (cb_so_snap_to_grid): fixed for one cell and absolute
anchors. [#754792]
2015-08-24 Jean Brefort <jean.brefort@normalesup.org>
* src/sheet-object.c (sheet_object_update_bounds),
......
......@@ -2,6 +2,7 @@ Gnumeric 1.12.24
Jean:
* Fix printing of sheet objects with one cell or absolute anchors. [#753961]
* Fix snap to grid for one cell or basolute anchored objects. [#754792]
--------------------------------------------------------------------------
Gnumeric 1.12.23
......
......@@ -135,8 +135,16 @@ cb_so_snap_to_grid (SheetObject *so, SheetControl *sc)
{
SheetObjectAnchor *snapped =
sheet_object_anchor_dup (sheet_object_get_anchor (so));
GnmSOAnchorMode mode = snapped->mode;
snapped->mode = GNM_SO_ANCHOR_TWO_CELLS;
snapped->offset[0] = snapped->offset[1] = 0.;
snapped->offset[2] = snapped->offset[3] = 1.;
if (mode != GNM_SO_ANCHOR_TWO_CELLS) {
double pts[4];
sheet_object_anchor_to_pts (snapped, so->sheet, pts);
snapped->mode = mode;
sheet_object_pts_to_anchor (snapped, so->sheet, pts);
}
cmd_objects_move (sc_wbc (sc),
g_slist_prepend (NULL, so),
g_slist_prepend (NULL, snapped),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment