Skip to content

Commit

Permalink
use attribute value in the output file name for Split vector layer
Browse files Browse the repository at this point in the history
algorithm (fix #37296)
  • Loading branch information
alexbruy committed Jun 18, 2020
1 parent a835cdf commit f465efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analysis/processing/qgsalgorithmsplitvectorlayer.cpp
Expand Up @@ -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 ) );
Expand Down

0 comments on commit f465efe

Please sign in to comment.