diff --git a/src/sp-item-group.cpp b/src/sp-item-group.cpp
index 3ce551b983199f763841b7acdaaa622dbfa0be80..b5f6881b72e73909f6f9e2f3ba4b755b08bb4585 100644 (file)
--- a/src/sp-item-group.cpp
+++ b/src/sp-item-group.cpp
#include "document.h"
#include "style.h"
#include "attributes.h"
+#include "sp-item-transform.h"
#include "sp-root.h"
#include "sp-use.h"
}
}
+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;
}
@@ -648,7 +662,7 @@ void CGroup::calculateBBox(NRRect *bbox, NR::Matrix const &transform, unsigned c
}
void CGroup::onPrint(SPPrintContext *ctx) {
- GSList *l = _childList(false);
+ GSList *l = g_slist_reverse(_childList(false));
while (l) {
SPObject *o = SP_OBJECT (l->data);
if (SP_IS_ITEM(o)) {
@@ -693,7 +707,7 @@ void CGroup::_showChildren (NRArena *arena, NRArenaItem *ai, unsigned int key, u
NRArenaItem *ac = NULL;
NRArenaItem *ar = NULL;
SPItem * child = NULL;
- GSList *l = _childList(false, ActionShow);
+ GSList *l = g_slist_reverse(_childList(false, ActionShow));
while (l) {
SPObject *o = SP_OBJECT (l->data);
if (SP_IS_ITEM (o)) {
@@ -712,7 +726,7 @@ void CGroup::_showChildren (NRArena *arena, NRArenaItem *ai, unsigned int key, u
void CGroup::hide (unsigned int key) {
SPItem * child;
- GSList *l = _childList(false, ActionShow);
+ GSList *l = g_slist_reverse(_childList(false, ActionShow));
while (l) {
SPObject *o = SP_OBJECT (l->data);
if (SP_IS_ITEM (o)) {