diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-02-28 18:36:08 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-02-28 18:36:08 +0000 |
| commit | 5974e91ff387b44b30434d3a2ede5f1ea6791a7c (patch) | |
| tree | 93c062f10f51d6ea670d716d49b5c5883181e055 /src/sp-root.cpp | |
| parent | update to trunk (diff) | |
| parent | Spray tool: (diff) | |
| download | inkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.tar.gz inkscape-5974e91ff387b44b30434d3a2ede5f1ea6791a7c.zip | |
update to trunk
(bzr r11950.1.259)
Diffstat (limited to 'src/sp-root.cpp')
| -rw-r--r-- | src/sp-root.cpp | 18 |
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: |
