From b509a33d405dac5d1064f64644966d8304a21823 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Thu, 12 Feb 2015 11:17:54 -0500 Subject: use up-to-date document units when intiallizing viewbox during a file load (bzr r13918) --- src/sp-root.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sp-root.cpp') diff --git a/src/sp-root.cpp b/src/sp-root.cpp index 85582e209..3a39a51c1 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -30,6 +30,7 @@ #include "svg/stringstream.h" #include "svg/svg.h" #include "xml/repr.h" +#include "util/units.h" #include "sp-factory.h" @@ -298,7 +299,7 @@ void SPRoot::update(SPCtx *ctx, guint flags) SPItemCtx rctx = *ictx; rctx.viewport = Geom::Rect::from_xywh( this->x.computed, this->y.computed, this->width.computed, this->height.computed ); - rctx = get_rctx( &rctx ); + rctx = get_rctx( &rctx, Inkscape::Util::Quantity::convert(1, this->document->getDisplayUnit(), "px") ); /* And invoke parent method */ SPGroup::update((SPCtx *) &rctx, flags); -- cgit v1.2.3 From df7828a7a8ba0b7e6c2dd892ca5f0a62ef718bf0 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Tue, 24 Feb 2015 19:22:08 -0500 Subject: create SPObject factory (bzr r13939.1.1) --- src/sp-root.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/sp-root.cpp') diff --git a/src/sp-root.cpp b/src/sp-root.cpp index 3a39a51c1..8bedec0a5 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -13,10 +13,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include #include <2geom/transforms.h> @@ -32,17 +28,6 @@ #include "xml/repr.h" #include "util/units.h" -#include "sp-factory.h" - -namespace { -SPObject *createRoot() -{ - return new SPRoot(); -} - -bool rootRegistered = SPFactory::instance().registerObject("svg:svg", createRoot); -} - SPRoot::SPRoot() : SPGroup(), SPViewBox() { this->onload = NULL; -- cgit v1.2.3