Code

fixing incorrect group children order (bug introduced with <switch> support)
authorknutux <knutux@users.sourceforge.net>
Fri, 21 Apr 2006 04:56:23 +0000 (04:56 +0000)
committerknutux <knutux@users.sourceforge.net>
Fri, 21 Apr 2006 04:56:23 +0000 (04:56 +0000)
src/sp-item-group.cpp

index 3ce551b983199f763841b7acdaaa622dbfa0be80..cd11b3c41be974c2e4e3ae95da4a2855e9debbb5 100644 (file)
@@ -648,7 +648,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 +693,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 +712,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)) {