File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ QgsAtlasComposition::QgsAtlasComposition( QgsComposition* composition ) :
4141 QgsExpression::setSpecialColumn ( " $feature" , QVariant (( int )0 ) );
4242 QgsExpression::setSpecialColumn ( " $numpages" , QVariant (( int )1 ) );
4343 QgsExpression::setSpecialColumn ( " $numfeatures" , QVariant (( int )0 ) );
44+ QgsExpression::setSpecialColumn ( " $currentfeature" , QVariant (( int )0 ) );
4445}
4546
4647QgsAtlasComposition::~QgsAtlasComposition ()
@@ -225,6 +226,7 @@ void QgsAtlasComposition::prepareForFeature( int featureI )
225226
226227 // retrieve the next feature, based on its id
227228 mCoverageLayer ->getFeatures ( QgsFeatureRequest ().setFilterFid ( mFeatureIds [ featureI ] ) ).nextFeature ( mCurrentFeature );
229+ QgsExpression::setSpecialColumn ( " $currentfeature" , mCurrentFeature .id () );
228230
229231 if ( !mSingleFile && mFilenamePattern .size () > 0 )
230232 {
You can’t perform that action at this time.
0 commit comments