Skip to content

Commit

Permalink
[processing] Fix feedback message in merge vector alg
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 8, 2018
1 parent 77786f3 commit 827eee9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/analysis/processing/qgsalgorithmmergevector.cpp
Expand Up @@ -186,16 +186,18 @@ QVariantMap QgsMergeVectorAlgorithm::processAlgorithm( const QVariantMap &parame
bool isMulti = QgsWkbTypes::isMultiType( outputType );
double step = totalFeatureCount > 0 ? 100.0 / totalFeatureCount : 1;
i = 0;
int layerNumber = 0;
for ( QgsMapLayer *layer : layers )
{
layerNumber++;
if ( !layer )
continue;

QgsVectorLayer *vl = qobject_cast< QgsVectorLayer * >( layer );
if ( !vl )
continue;

feedback->pushInfo( QObject::tr( "Packaging layer %1/%2: %3" ).arg( i ).arg( layers.count() ).arg( layer->name() ) );
feedback->pushInfo( QObject::tr( "Packaging layer %1/%2: %3" ).arg( layerNumber ).arg( layers.count() ).arg( layer->name() ) );

QgsFeatureIterator it = vl->getFeatures( QgsFeatureRequest().setDestinationCrs( outputCrs, context.transformContext() ) );
QgsFeature f;
Expand Down

0 comments on commit 827eee9

Please sign in to comment.