Explicitly get the index from the provider, explicitly call template for doubles

This commit is contained in:
uclaros 2025-01-08 11:41:24 +02:00 committed by Martin Dobias
parent d989f5981f
commit ac77049fbd
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,6 @@
QgsPointCloudEditingIndex::QgsPointCloudEditingIndex( QgsPointCloudLayer *layer )
: mIndex( layer ? layer->index() : QgsPointCloudIndex() )
{
if ( !layer ||
!layer->dataProvider() ||
@ -28,6 +27,8 @@ QgsPointCloudEditingIndex::QgsPointCloudEditingIndex( QgsPointCloudLayer *layer
!( layer->dataProvider()->capabilities() & QgsPointCloudDataProvider::Capability::ChangeAttributeValues ) )
return;
mIndex = layer->dataProvider()->index();
mAttributes = mIndex.attributes();
mScale = mIndex.scale();
mOffset = mIndex.offset();

View File

@ -74,7 +74,7 @@ bool QgsPointCloudLayerEditUtils::changeAttributeValue( const QgsPointCloudNodeI
for ( int i : sortedPoints )
{
// replace attribute for selected point
lazStoreToStream_( ptr, i * recordSize + attributeOffset, attribute.type(), value );
lazStoreToStream_<double>( ptr, i * recordSize + attributeOffset, attribute.type(), value );
}
return mIndex.updateNodeData( {{n, data}} );;