diff --git a/src/document.cpp b/src/document.cpp
index d0792ab8a7c5c01931638528d1088cd38f43b417..bf5ef089e625fb186c80860ce4e1fbf7a5020fea 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
#include "inkscape-private.h"
#include "inkscape_version.h"
#include "sp-object-repr.h"
+#include "sp-namedview.h"
+#include "desktop.h"
#include "document-private.h"
#include "dir-util.h"
#include "unit-constants.h"
NR::translate const tr(NR::Point(0, (old_height - h))
- rect.min());
SP_GROUP(root)->translateChildItems(tr);
+ SPNamedView *nv = sp_document_namedview(this, 0);
+ if(nv) {
+ NR::translate tr2(-rect.min());
+ nv->translateGuides(tr2);
+
+ // update the viewport so the drawing appears to stay where it was
+ nv->scrollAllDesktops(-tr2[0], tr2[1], false);
+ }
}
void sp_document_set_uri(SPDocument *document, gchar const *uri)