diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2015-01-19 15:18:38 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2015-01-19 15:18:38 +0000 |
| commit | 82ea99160b97349036d173bf8aa95d47d571eeaf (patch) | |
| tree | 55487d4336e5b1785dfcd28f4f139f9b71b71503 /src | |
| parent | Fix EPS export area (Bug #1411208) (diff) | |
| download | inkscape-82ea99160b97349036d173bf8aa95d47d571eeaf.tar.gz inkscape-82ea99160b97349036d173bf8aa95d47d571eeaf.zip | |
Don't update viewbox if referenced element not <symbol> or <svg>
(bzr r13864)
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp-use.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 3b95e599d..7e02de3c1 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -35,6 +35,7 @@ #include "preferences.h" #include "style.h" #include "sp-symbol.h" +#include "sp-root.h" #include "sp-use.h" #include "sp-use-reference.h" #include "sp-shape.h" @@ -562,13 +563,17 @@ void SPUse::update(SPCtx *ctx, unsigned flags) { this->height.computed = this->height.value * ictx->viewport.height(); } - cctx.viewport = Geom::Rect::from_xywh(0, 0, this->width.computed, this->height.computed); - cctx.i2vp = Geom::identity(); childflags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B; if (this->child) { sp_object_ref(this->child); + // viewport is only changed if referencing a symbol or svg element + if( SP_IS_SYMBOL(this->child) || SP_IS_ROOT(this->child) ) { + cctx.viewport = Geom::Rect::from_xywh(0, 0, this->width.computed, this->height.computed); + cctx.i2vp = Geom::identity(); + } + if (childflags || (this->child->uflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { SPItem const *chi = dynamic_cast<SPItem const *>(child); g_assert(chi != NULL); |
