mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-30 00:29:39 -05:00
Explicitly get the index from the provider, explicitly call template for doubles
This commit is contained in:
parent
d989f5981f
commit
ac77049fbd
@ -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();
|
||||
|
||||
@ -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}} );;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user