summaryrefslogtreecommitdiffstats
path: root/src/sp-namedview.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-12-20 22:07:22 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-12-20 22:07:22 +0000
commit14b6891e5d84dc76829749d888e9dd769c037ebb (patch)
tree1690b0f2187e754a3fed3ecbe2ef2a94c4af3eba /src/sp-namedview.cpp
parentfix bug in emphasized line drawing for axonometric grid when origin is not zero (diff)
downloadinkscape-14b6891e5d84dc76829749d888e9dd769c037ebb.tar.gz
inkscape-14b6891e5d84dc76829749d888e9dd769c037ebb.zip
when resizing page, move the origin of the grids too. This way all objects will stay aligned to the grids.
(bzr r10787)
Diffstat (limited to 'src/sp-namedview.cpp')
-rw-r--r--src/sp-namedview.cpp9
1 files changed, 9 insertions, 0 deletions
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<Inkscape::CanvasGrid*>(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<SPDesktop *>(l->data);