summaryrefslogtreecommitdiffstats
path: root/src/sp-root.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-02-28 15:50:05 +0000
committerMartin Owens <doctormo@gmail.com>2014-02-28 15:50:05 +0000
commit1bc1b442d8ec6f394f456c4675d5ca7f6aa1d0d6 (patch)
tree0b4c86988abeb6c01b23324f159bd0a8a936f485 /src/sp-root.cpp
parentImproved uri testing (diff)
parentSpray tool: (diff)
downloadinkscape-1bc1b442d8ec6f394f456c4675d5ca7f6aa1d0d6.tar.gz
inkscape-1bc1b442d8ec6f394f456c4675d5ca7f6aa1d0d6.zip
Merge to trunk
(bzr r13047.1.7)
Diffstat (limited to 'src/sp-root.cpp')
-rw-r--r--src/sp-root.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index bc870b116..12570e03e 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -221,7 +221,7 @@ void SPRoot::remove_child(Inkscape::XML::Node *child)
void SPRoot::update(SPCtx *ctx, guint flags)
{
- SPItemCtx *ictx = (SPItemCtx *) ctx;
+ SPItemCtx const *ictx = (SPItemCtx const *) ctx;
if( !this->parent ) {
@@ -288,10 +288,17 @@ void SPRoot::update(SPCtx *ctx, guint flags)
this->height.computed = this->height.value * ictx->viewport.height();
}
+ // std::cout << "SPRoot::update: final:"
+ // << " x: " << x.computed
+ // << " y: " << y.computed
+ // << " width: " << width.computed
+ // << " height: " << height.computed << std::endl;
+
// Calculate new viewport
- ictx->viewport = Geom::Rect::from_xywh( this->x.computed, this->y.computed,
- this->width.computed, this->height.computed );
- SPItemCtx rctx = get_rctx( ictx );
+ 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 );
/* And invoke parent method */
SPGroup::update((SPCtx *) &rctx, flags);
@@ -380,6 +387,9 @@ void SPRoot::print(SPPrintContext *ctx)
sp_print_release(ctx);
}
+const char *SPRoot::displayName() const {
+ return "SVG"; // Do not translate
+}
/*
Local Variables: