Skip to content

Commit

Permalink
[processing] widget wrapper for point cloud atribute parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Apr 4, 2023
1 parent 1f77406 commit 959777c
Show file tree
Hide file tree
Showing 8 changed files with 855 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/core/pointcloud/qgspointcloudattributemodel.cpp
Expand Up @@ -35,7 +35,10 @@ void QgsPointCloudAttributeModel::setLayer( QgsPointCloudLayer *layer )
setAttributes( layer->attributes() );
}
else
{
mLayer = nullptr;
setAttributes( QgsPointCloudAttributeCollection() );
}
}

QgsPointCloudLayer *QgsPointCloudAttributeModel::layer()
Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingparameters.cpp
Expand Up @@ -8803,7 +8803,7 @@ QString QgsProcessingParameterPointCloudLayer::valueAsPythonString( const QVaria

QVariantMap p;
p.insert( name(), val );
QgsPointCloudLayer *layer = QgsProcessingParameters::parameterAsPointCloudLayer( this, p, context );
QgsPointCloudLayer *layer = QgsProcessingParameters::parameterAsPointCloudLayer( this, p, context, QgsProcessing::LayerOptionsFlag::SkipIndexGeneration );
return layer ? QgsProcessingUtils::stringToPythonLiteral( QgsProcessingUtils::normalizeLayerSource( layer->source() ) )
: QgsProcessingUtils::stringToPythonLiteral( val.toString() );
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/processing/qgsprocessingguiregistry.cpp
Expand Up @@ -82,6 +82,7 @@ QgsProcessingGuiRegistry::QgsProcessingGuiRegistry()
addParameterWidgetFactory( new QgsProcessingPointCloudLayerWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingAnnotationLayerWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingPointCloudDestinationWidgetWrapper() );
addParameterWidgetFactory( new QgsProcessingPointCloudAttributeWidgetWrapper() );
}

QgsProcessingGuiRegistry::~QgsProcessingGuiRegistry()
Expand Down

0 comments on commit 959777c

Please sign in to comment.