From 14b6891e5d84dc76829749d888e9dd769c037ebb Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 20 Dec 2011 23:07:22 +0100 Subject: when resizing page, move the origin of the grids too. This way all objects will stay aligned to the grids. (bzr r10787) --- src/sp-namedview.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/sp-namedview.cpp') diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index ca30ccae2..2de38d9f8 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -1116,6 +1116,15 @@ void SPNamedView::translateGuides(Geom::Translate const &tr) { } } +void SPNamedView::translateGrids(Geom::Translate const &tr) { + for (GSList *l = grids; l != NULL; l = l->next) { + Inkscape::CanvasGrid* g = reinterpret_cast(l->data); + if (g) { + g->setOrigin(g->origin * tr); + } + } +} + void SPNamedView::scrollAllDesktops(double dx, double dy, bool is_scrolling) { for(GSList *l = views; l; l = l->next) { SPDesktop *desktop = static_cast(l->data); -- cgit v1.2.3