Skip to content
Permalink
Browse files

remove unuseful %s

  • Loading branch information
luipir committed Sep 4, 2018
1 parent 7d1471a commit 30eddf5a2027f17fe3bb968539cf212c6e499eed
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/processing/models/qgsprocessingmodelalgorithm.cpp
@@ -531,7 +531,7 @@ QMap<QString, QgsProcessingModelAlgorithm::VariableDefinition> QgsProcessingMode
if ( !layer )
layer = QgsProcessingUtils::mapLayerFromString( value.toString(), context );

variables.insert( safeName( QStringLiteral( "%1" ).arg( name ) ), VariableDefinition( QVariant::fromValue( layer ), source, description ) );
variables.insert( safeName( name ), VariableDefinition( QVariant::fromValue( layer ), source, description ) );
variables.insert( safeName( QStringLiteral( "%1_minx" ).arg( name ) ), VariableDefinition( layer ? layer->extent().xMinimum() : QVariant(), source, QObject::tr( "Minimum X of %1" ).arg( description ) ) );
variables.insert( safeName( QStringLiteral( "%1_miny" ).arg( name ) ), VariableDefinition( layer ? layer->extent().yMinimum() : QVariant(), source, QObject::tr( "Minimum Y of %1" ).arg( description ) ) );
variables.insert( safeName( QStringLiteral( "%1_maxx" ).arg( name ) ), VariableDefinition( layer ? layer->extent().xMaximum() : QVariant(), source, QObject::tr( "Maximum X of %1" ).arg( description ) ) );
@@ -597,7 +597,7 @@ QMap<QString, QgsProcessingModelAlgorithm::VariableDefinition> QgsProcessingMode
featureSource = vl;
}

variables.insert( safeName( QStringLiteral( "%1" ).arg( name ) ), VariableDefinition( value, source, description ) );
variables.insert( safeName( name ), VariableDefinition( value, source, description ) );
variables.insert( safeName( QStringLiteral( "%1_minx" ).arg( name ) ), VariableDefinition( featureSource ? featureSource->sourceExtent().xMinimum() : QVariant(), source, QObject::tr( "Minimum X of %1" ).arg( description ) ) );
variables.insert( safeName( QStringLiteral( "%1_miny" ).arg( name ) ), VariableDefinition( featureSource ? featureSource->sourceExtent().yMinimum() : QVariant(), source, QObject::tr( "Minimum Y of %1" ).arg( description ) ) );
variables.insert( safeName( QStringLiteral( "%1_maxx" ).arg( name ) ), VariableDefinition( featureSource ? featureSource->sourceExtent().xMaximum() : QVariant(), source, QObject::tr( "Maximum X of %1" ).arg( description ) ) );

0 comments on commit 30eddf5

Please sign in to comment.
You can’t perform that action at this time.