Skip to content

Commit

Permalink
Use correct index() method to use editing index
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdkon authored and nyalldawson committed Jan 25, 2025
1 parent 0d5f01d commit 4113f4b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ bool QgsPointCloudLayer::changeAttributeValue( const QgsPointCloudNodeId &n, con

QgsPointCloudIndex QgsPointCloudLayer::index() const
{
QGIS_PROTECT_QOBJECT_THREAD_ACCESS_NON_FATAL
QGIS_PROTECT_QOBJECT_THREAD_ACCESS
if ( mEditIndex )
return mEditIndex;

Expand Down
8 changes: 4 additions & 4 deletions src/core/pointcloud/qgspointcloudlayerprofilegenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ void QgsPointCloudLayerProfileResults::copyPropertiesFromGenerator( const QgsAbs

QgsPointCloudLayerProfileGenerator::QgsPointCloudLayerProfileGenerator( QgsPointCloudLayer *layer, const QgsProfileRequest &request )
: mLayer( layer )
, mIndex( layer->dataProvider()->index() )
, mIndex( layer->index() )
, mSubIndexes( layer->dataProvider()->subIndexes() )
, mLayerAttributes( layer->attributes() )
, mRenderer( qgis::down_cast< QgsPointCloudLayerElevationProperties* >( layer->elevationProperties() )->respectLayerColors() && mLayer->renderer() ? mLayer->renderer()->clone() : nullptr )
Expand All @@ -363,10 +363,10 @@ QgsPointCloudLayerProfileGenerator::QgsPointCloudLayerProfileGenerator( QgsPoint
, mZScale( layer->elevationProperties()->zScale() )
, mStepDistance( request.stepDistance() )
{
if ( mLayer->index() )
if ( mIndex )
{
mScale = mLayer->index().scale();
mOffset = mLayer->index().offset();
mScale = mIndex.scale();
mOffset = mIndex.offset();
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/pointcloud/qgspointcloudlayerrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ QgsPointCloudLayerRenderer::QgsPointCloudLayerRenderer( QgsPointCloudLayer *laye
if ( !layer->dataProvider() || !layer->renderer() )
return;

mIndex = layer->dataProvider()->index();
mIndex = layer->index();

QElapsedTimer timer;
timer.start();
Expand Down

0 comments on commit 4113f4b

Please sign in to comment.