Merge pull request #37298 from alexbruy/split-vector

use attribute value in the output file name for Split vector layer algorithm (fix #37296)
This commit is contained in:
Alexander Bruy 2020-08-03 09:33:39 +03:00 committed by GitHub
commit c1e91425b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ QVariantMap QgsSplitVectorLayerAlgorithm::processAlgorithm( const QVariantMap &p
if ( feedback->isCanceled() )
break;
QString fileName = QStringLiteral( "%1_%2.%3" ).arg( baseName ).arg( current ).arg( outputFormat );
QString fileName = QStringLiteral( "%1_%2.%3" ).arg( baseName ).arg( ( *it ).toString() ).arg( outputFormat );
feedback->pushInfo( QObject::tr( "Creating layer: %1" ).arg( fileName ) );
sink.reset( QgsProcessingUtils::createFeatureSink( fileName, context, fields, geometryType, crs ) );