From 62dad53172661dfa1ef8dd3ed07e06d2ea2523a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Krzysztof=20Kosi=C5=84ski?= Date: Sat, 3 Apr 2010 14:47:02 +0200 Subject: [PATCH] Fix behavior when loading a document --- src/desktop.cpp | 1 - src/helper/pixbuf-ops.cpp | 2 +- src/selection-chemistry.cpp | 8 +++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/desktop.cpp b/src/desktop.cpp index c45cf8004..1953ae2a6 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1543,7 +1543,6 @@ SPDesktop::onDocumentURISet (gchar const* uri) void SPDesktop::onDocumentResized (gdouble width, gdouble height) { - _doc2dt[5] = height; sp_canvas_item_affine_absolute (SP_CANVAS_ITEM (drawing), _doc2dt); Geom::Rect const a(Geom::Point(0, 0), Geom::Point(width, height)); SP_CTRLRECT(page)->setRectangle(a); diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 3be63aa68..c26d55b8b 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -113,7 +113,7 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/, double padding = 1.0; Geom::Point origin(screen.min()[Geom::X], - sp_document_height(doc) - screen[Geom::Y].extent() - screen.min()[Geom::Y]); + screen.min()[Geom::Y]); origin[Geom::X] = origin[Geom::X] + (screen[Geom::X].extent() * ((1 - padding) / 2)); origin[Geom::Y] = origin[Geom::Y] + (screen[Geom::Y].extent() * ((1 - padding) / 2)); diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 7ac2e5471..452a4ff9d 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2273,9 +2273,8 @@ void sp_selection_to_marker(SPDesktop *desktop, bool apply) } // calculate the transform to be applied to objects to move them to 0,0 - Geom::Point move_p = Geom::Point(0, sp_document_height(doc)) - *c; - move_p[Geom::Y] = -move_p[Geom::Y]; - Geom::Matrix move = Geom::Matrix(Geom::Translate(move_p)); + Geom::Point move_p = -*c; + Geom::Matrix move = Geom::Translate(move_p); GSList *items = g_slist_copy((GSList *) selection->itemList()); @@ -2396,8 +2395,7 @@ sp_selection_tile(SPDesktop *desktop, bool apply) } // calculate the transform to be applied to objects to move them to 0,0 - Geom::Point move_p = Geom::Point(0, sp_document_height(doc)) - (r->min() + Geom::Point(0, r->dimensions()[Geom::Y])); - move_p[Geom::Y] = -move_p[Geom::Y]; + Geom::Point move_p = -(r->min() + Geom::Point(0, r->dimensions()[Geom::Y])); Geom::Matrix move = Geom::Matrix(Geom::Translate(move_p)); GSList *items = g_slist_copy((GSList *) selection->itemList()); -- 2.30.2