diff options
| author | Aaron Spike <aaron@ekips.org> | 2006-04-28 04:14:59 +0000 |
|---|---|---|
| committer | acspike <acspike@users.sourceforge.net> | 2006-04-28 04:14:59 +0000 |
| commit | 290410e3b0ef13947447f6026e18eba666f61aa6 (patch) | |
| tree | 47af87c40a055cce76e740c25ebf6c96f3a0386f /src/sp-item-group.cpp | |
| parent | Added CREATE v0.1 support for gradients/swatches/patterns (diff) | |
| download | inkscape-290410e3b0ef13947447f6026e18eba666f61aa6.tar.gz inkscape-290410e3b0ef13947447f6026e18eba666f61aa6.zip | |
fix translation for fit page
the translation is now preserved across save by translating all child elements of the root
instead of just translating the root itself.
(bzr r602)
Diffstat (limited to 'src/sp-item-group.cpp')
| -rw-r--r-- | src/sp-item-group.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp index cd11b3c41..b5f6881b7 100644 --- a/src/sp-item-group.cpp +++ b/src/sp-item-group.cpp @@ -29,6 +29,7 @@ #include "document.h" #include "style.h" #include "attributes.h" +#include "sp-item-transform.h" #include "sp-root.h" #include "sp-use.h" @@ -524,6 +525,19 @@ void SPGroup::_updateLayerMode(unsigned int display_key) { } } +void SPGroup::translateChildItems(NR::translate const &tr) +{ + if (this->hasChildren()) + { + SPObject *o = NULL; + for (o = sp_object_first_child(SP_OBJECT(this)) ; o != NULL ; o = SP_OBJECT_NEXT(o) ) { + if (SP_IS_ITEM (o)) { + sp_item_move_rel(static_cast<SPItem *>(o), tr); + } + } + } +} + CGroup::CGroup(SPGroup *group) { _group = group; } |
