summaryrefslogtreecommitdiffstats
path: root/src/sp-root.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-02-27 13:25:45 +0000
committertavmjong-free <tavmjong@free.fr>2014-02-27 13:25:45 +0000
commit70d5e94706c772944411e12e13082b531ed2185e (patch)
tree022918d70c92626f98f4feca29b7df61fdb425c6 /src/sp-root.cpp
parentCorrect the ungrouping logic so that selected clones of selected groups (diff)
downloadinkscape-70d5e94706c772944411e12e13082b531ed2185e.tar.gz
inkscape-70d5e94706c772944411e12e13082b531ed2185e.zip
Don't overwrite SPItemCtx in SPRoot::update. (Maybe should be made const everywhere?)
(bzr r13065)
Diffstat (limited to 'src/sp-root.cpp')
-rw-r--r--src/sp-root.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index bc870b116..4f1444e31 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);