mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-16 00:05:45 -04:00
add more feedback cancellation and fix doc
This commit is contained in:
parent
0f70883b6d
commit
abd5fad9dd
@ -228,7 +228,7 @@ Creates a new instance of the raster data provider.
|
||||
const QString &driverName,
|
||||
const QgsCoordinateReferenceSystem &crs ) const;
|
||||
%Docstring
|
||||
Creates mesh data source (depending of the provider)
|
||||
Creates mesh data source, that is the mesh frame stored in file, memory or with other way (depending of the provider)
|
||||
|
||||
.. versionadded:: 3.16
|
||||
%End
|
||||
|
@ -85,6 +85,9 @@ bool QgsTinMeshCreationAlgorithm::prepareAlgorithm( const QVariantMap ¶meter
|
||||
|
||||
for ( const QVariant &layer : layersList )
|
||||
{
|
||||
if ( feedback && feedback->isCanceled() )
|
||||
return false;
|
||||
|
||||
if ( layer.type() != QVariant::Map )
|
||||
continue;
|
||||
const QVariantMap layerMap = layer.toMap();
|
||||
@ -112,6 +115,7 @@ bool QgsTinMeshCreationAlgorithm::prepareAlgorithm( const QVariantMap ¶meter
|
||||
|
||||
if ( mVerticesLayer.isEmpty() && mBreakLinesLayer.isEmpty() )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -124,10 +128,21 @@ QVariantMap QgsTinMeshCreationAlgorithm::processAlgorithm( const QVariantMap &pa
|
||||
triangulation.setCrs( destinationCrs );
|
||||
|
||||
for ( Layer &l : mVerticesLayer )
|
||||
{
|
||||
if ( feedback && feedback->isCanceled() )
|
||||
break;
|
||||
triangulation.addVertices( l.fit, l.attributeIndex, l.transform, feedback, l.featureCount );
|
||||
}
|
||||
|
||||
for ( Layer &l : mBreakLinesLayer )
|
||||
{
|
||||
if ( feedback && feedback->isCanceled() )
|
||||
break;
|
||||
triangulation.addBreakLines( l.fit, l.attributeIndex, l.transform, feedback, l.featureCount );
|
||||
}
|
||||
|
||||
if ( feedback && feedback->isCanceled() )
|
||||
return QVariantMap();
|
||||
|
||||
const QString fileName = parameterAsFile( parameters, QStringLiteral( "OUTPUT_MESH" ), context );
|
||||
int driverIndex = parameterAsEnum( parameters, QStringLiteral( "MESH_FORMAT" ), context );
|
||||
|
@ -292,7 +292,7 @@ class CORE_EXPORT QgsProviderMetadata : public QObject
|
||||
const QStringList &createOptions = QStringList() ) SIP_FACTORY;
|
||||
|
||||
/**
|
||||
* Creates mesh data source (depending of the provider)
|
||||
* Creates mesh data source, that is the mesh frame stored in file, memory or with other way (depending of the provider)
|
||||
* \since QGIS 3.16
|
||||
*/
|
||||
virtual bool createMeshData(
|
||||
|
Loading…
x
Reference in New Issue
Block a user