It is perfectly valid to reparent nodes to a parent
that is part of an existing hierarchy.
Change-Id: Icf2dbe6030d399047e7ebe735e3096d1a8cd8c0e
Task-number: QTBUG-43278
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
*/
void QSGNode::reparentChildNodesTo(QSGNode *newParent)
{
- Q_ASSERT_X(!newParent->parent(), "QSGNode::reparentChildNodesTo", "newParent is already part of a hierarchy");
-
for (QSGNode *c = firstChild(); c; c = firstChild()) {
removeChildNode(c);
newParent->appendChildNode(c);