+ if (st.omit) {
+ State &parent = _state_stack[_state_stack.size() - 2];
+ int nChildren = st.node->nChildren();
+ for (int i = 0; i < nChildren; i++) {
+ SGPropertyNode *src = st.node->getChild(i);
+ const char *name = src->getName();
+ int index = parent.counters[name];
+ parent.counters[name]++;
+ SGPropertyNode *dst = parent.node->getChild(name, index, true);
+ copyProperties(src, dst);
+ }
+ parent.node->removeChild(st.node->getName(), st.node->getIndex(), false);
+ }