mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Fix assert when trying to find a child node not yet populated
This commit is contained in:
parent
6f010b4933
commit
a2cc42e52d
@ -255,6 +255,9 @@ static QgsChunkNode *findChunkNodeFromNodeId( QgsChunkNode *rootNode, QgsPointCl
|
|||||||
QgsPointCloudNodeId p = parentIds.takeLast();
|
QgsPointCloudNodeId p = parentIds.takeLast();
|
||||||
QgsChunkNodeId childNodeId( p.d(), p.x(), p.y(), p.z() );
|
QgsChunkNodeId childNodeId( p.d(), p.x(), p.y(), p.z() );
|
||||||
|
|
||||||
|
if ( !chunk->hasChildrenPopulated() )
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
QgsChunkNode *chunkChild = nullptr;
|
QgsChunkNode *chunkChild = nullptr;
|
||||||
QgsChunkNode *const *children = chunk->children();
|
QgsChunkNode *const *children = chunk->children();
|
||||||
for ( int i = 0; i < chunk->childCount(); ++i )
|
for ( int i = 0; i < chunk->childCount(); ++i )
|
||||||
@ -287,9 +290,11 @@ QgsPointCloudLayerChunkedEntity::QgsPointCloudLayerChunkedEntity( Qgs3DMapSettin
|
|||||||
mChunkUpdaterFactory.reset( new QgsChunkUpdaterFactory( mChunkLoaderFactory ) );
|
mChunkUpdaterFactory.reset( new QgsChunkUpdaterFactory( mChunkLoaderFactory ) );
|
||||||
|
|
||||||
connect( pcl, &QgsPointCloudLayer::chunkAttributeValuesChanged, this, [this]( const QgsPointCloudNodeId &n ) {
|
connect( pcl, &QgsPointCloudLayer::chunkAttributeValuesChanged, this, [this]( const QgsPointCloudNodeId &n ) {
|
||||||
QList<QgsChunkNode *> nodes;
|
QgsChunkNode *node = findChunkNodeFromNodeId( mRootNode, n );
|
||||||
nodes << findChunkNodeFromNodeId( mRootNode, n );
|
if ( node )
|
||||||
updateNodes( nodes, mChunkUpdaterFactory.get() );
|
{
|
||||||
|
updateNodes( QList<QgsChunkNode *>() << node, mChunkUpdaterFactory.get() );
|
||||||
|
}
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user