qt4/qt5: fix some kinds of OCG models
properly pass parent and child when building the tree
diff --git a/qt4/src/poppler-optcontent.cc b/qt4/src/poppler-optcontent.cc
index 6a5ffe7..b9ceb7e 100644
--- a/qt4/src/poppler-optcontent.cc
+++ b/qt4/src/poppler-optcontent.cc
@@ -172,7 +172,7 @@
while ( i.hasNext() ) {
i.next();
qDebug() << "iterator" << i.key() << ":" << i.value();
- addChild( i.value(), m_rootNode );
+ addChild( m_rootNode, i.value() );
}
} else {
parseOrderArray( m_rootNode, optContent->getOrderArray() );
diff --git a/qt5/src/poppler-optcontent.cc b/qt5/src/poppler-optcontent.cc
index 5af37c8..94df59e 100644
--- a/qt5/src/poppler-optcontent.cc
+++ b/qt5/src/poppler-optcontent.cc
@@ -172,7 +172,7 @@
while ( i.hasNext() ) {
i.next();
qDebug() << "iterator" << i.key() << ":" << i.value();
- addChild( i.value(), m_rootNode );
+ addChild( m_rootNode, i.value() );
}
} else {
parseOrderArray( m_rootNode, optContent->getOrderArray() );