mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
trigger loading of sub indexes using queued connection
This commit is contained in:
parent
ca5041b116
commit
993c95dacc
@ -56,7 +56,9 @@ QgsVirtualPointCloudEntity::QgsVirtualPointCloudEntity( QgsPointCloudLayer *laye
|
||||
}
|
||||
|
||||
updateBboxEntity();
|
||||
connect( this, &QgsVirtualPointCloudEntity::subIndexNeedsLoading, provider(), &QgsVirtualPointCloudProvider::loadSubIndex, Qt::QueuedConnection );
|
||||
connect( provider(), &QgsVirtualPointCloudProvider::subIndexLoaded, this, &QgsVirtualPointCloudEntity::createChunkedEntityForSubIndex );
|
||||
|
||||
}
|
||||
|
||||
QList<QgsChunkedEntity *> QgsVirtualPointCloudEntity::chunkedEntities() const
|
||||
@ -120,7 +122,7 @@ void QgsVirtualPointCloudEntity::handleSceneUpdate( const SceneState &state )
|
||||
// then once the camera changes we display as bbox depending on screen space error
|
||||
const bool displayAsBbox = state.cameraPos.isNull() || sse < THRESHOLD;
|
||||
if ( !displayAsBbox && !subIndexes.at( i ).index() )
|
||||
provider()->loadSubIndex( i );
|
||||
emit subIndexNeedsLoading( i );
|
||||
|
||||
setRenderSubIndexAsBbox( i, displayAsBbox );
|
||||
if ( !displayAsBbox && mChunkedEntitiesMap.contains( i ) )
|
||||
|
@ -75,6 +75,9 @@ class QgsVirtualPointCloudEntity : public Qgs3DMapSceneEntity
|
||||
//! If \a asBbox is TRUE only the bounding box will be rendered for the sub index \a i. If it is FALSE, the sub index will be rendered as a chunked entity.
|
||||
void setRenderSubIndexAsBbox( int i, bool asBbox );
|
||||
|
||||
signals:
|
||||
void subIndexNeedsLoading( int i );
|
||||
|
||||
private:
|
||||
//! Updates the Bbox child entity to display the sub indexes set with setRenderSubIndexAsBbox()
|
||||
void updateBboxEntity();
|
||||
|
Loading…
x
Reference in New Issue
Block a user