QskSkinlet::removeTraillingNodes added
This commit is contained in:
parent
d8aee0e2a0
commit
2f69ca4388
@ -162,12 +162,7 @@ QSGNode* QskPageIndicatorSkinlet::updateBulletsNode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if count has decreased we need to remove superfluous nodes
|
// if count has decreased we need to remove superfluous nodes
|
||||||
while ( bulletNode->nextSibling() != nullptr )
|
removeTraillingNodes( node, bulletNode );
|
||||||
{
|
|
||||||
auto sibling = bulletNode->nextSibling();
|
|
||||||
node->removeChildNode( sibling );
|
|
||||||
delete sibling;
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -377,6 +377,18 @@ void QskSkinlet::insertNodeSorted( QSGNode* node, QSGNode* parentNode ) const
|
|||||||
parentNode->prependChildNode( node );
|
parentNode->prependChildNode( node );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinlet::removeTraillingNodes( QSGNode* node, QSGNode* child )
|
||||||
|
{
|
||||||
|
if ( node && child )
|
||||||
|
{
|
||||||
|
while ( auto sibling = child->nextSibling() )
|
||||||
|
{
|
||||||
|
node->removeChildNode( sibling );
|
||||||
|
delete sibling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QskSkinlet::setNodeRole( QSGNode* node, quint8 nodeRole )
|
void QskSkinlet::setNodeRole( QSGNode* node, quint8 nodeRole )
|
||||||
{
|
{
|
||||||
qskSetRole( nodeRole, node );
|
qskSetRole( nodeRole, node );
|
||||||
|
@ -49,6 +49,7 @@ class QSK_EXPORT QskSkinlet
|
|||||||
|
|
||||||
static void setNodeRole( QSGNode* node, quint8 nodeRole );
|
static void setNodeRole( QSGNode* node, quint8 nodeRole );
|
||||||
static quint8 nodeRole( const QSGNode* node );
|
static quint8 nodeRole( const QSGNode* node );
|
||||||
|
static void removeTraillingNodes( QSGNode* node, QSGNode* child );
|
||||||
|
|
||||||
static QSGNode* findNodeByRole( QSGNode* parent, quint8 nodeRole );
|
static QSGNode* findNodeByRole( QSGNode* parent, quint8 nodeRole );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user