summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 62dad53)
raw | patch | inline | side by side (parent: 62dad53)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sat, 3 Apr 2010 16:21:48 +0000 (18:21 +0200) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Sat, 3 Apr 2010 16:21:48 +0000 (18:21 +0200) |
src/document.cpp | patch | blob | history |
diff --git a/src/document.cpp b/src/document.cpp
index 101c54e30b687d38160ac0d9e2c55d4d0227e93a..f137ba60dab668fc43d0dd725db569fb2786a3f7 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
double const w = rect.width();
double const h = rect.height();
- double const old_height = sp_document_height(this);
SPUnit const &px(sp_unit_get_by_id(SP_UNIT_PX));
/* in px */
}
Geom::Rect const rect_with_margins(
- rect.min() - Geom::Point(margin_left, margin_bottom),
- rect.max() + Geom::Point(margin_right, margin_top));
+ rect.min() - Geom::Point(margin_left, margin_top),
+ rect.max() + Geom::Point(margin_right, margin_bottom));
sp_document_set_width(this, rect_with_margins.width(), &px);
sp_document_set_height(this, rect_with_margins.height(), &px);
- Geom::Translate const tr(
- Geom::Point(0, old_height - rect_with_margins.height())
- - to_2geom(rect_with_margins.min()));
+ Geom::Translate const tr(-to_2geom(rect_with_margins.min()));
SP_GROUP(root)->translateChildItems(tr);
if(nv) {
nv->translateGuides(tr2);
// update the viewport so the drawing appears to stay where it was
- nv->scrollAllDesktops(-tr2[0], tr2[1], false);
+ nv->scrollAllDesktops(-tr2[0], -tr2[1], false);
}
}