Skip to content

Commit

Permalink
remove unuseful %s
Browse files Browse the repository at this point in the history
  • Loading branch information
luipir committed Sep 4, 2018
1 parent 7d1471a commit 30eddf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/processing/models/qgsprocessingmodelalgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) ) );
Expand Down Expand Up @@ -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 ) ) );
Expand Down

0 comments on commit 30eddf5

Please sign in to comment.