mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Follow up 21c81d6
This commit is contained in:
parent
2b2066abb7
commit
307d4bd5a9
@ -3523,12 +3523,12 @@ void QgsComposer::writeWorldFile( QString worldFileName, double a, double b, dou
|
||||
}
|
||||
|
||||
|
||||
void QgsComposer::setAtlasFeature( QgsMapLayer* layer, const QgsFeature * feat )
|
||||
void QgsComposer::setAtlasFeature( QgsMapLayer* layer, const QgsFeature& feat )
|
||||
{
|
||||
//update expression variables
|
||||
QgsExpression::setSpecialColumn( "$atlasfeatureid", feat->id() );
|
||||
QgsExpression::setSpecialColumn( "$atlasfeature", QVariant::fromValue( *feat ) );
|
||||
QgsExpression::setSpecialColumn( "$atlasgeometry", QVariant::fromValue( *( feat->geometry() ) ) );
|
||||
QgsExpression::setSpecialColumn( "$atlasfeatureid", feat.id() );
|
||||
QgsExpression::setSpecialColumn( "$atlasfeature", QVariant::fromValue( feat ) );
|
||||
QgsExpression::setSpecialColumn( "$atlasgeometry", QVariant::fromValue( *( feat.geometry() ) ) );
|
||||
|
||||
emit atlasPreviewFeatureChanged();
|
||||
|
||||
@ -3557,7 +3557,7 @@ void QgsComposer::setAtlasFeature( QgsMapLayer* layer, const QgsFeature * feat )
|
||||
activate();
|
||||
|
||||
//set current preview feature id
|
||||
atlas.prepareForFeature( feat );
|
||||
atlas.prepareForFeature( &feat );
|
||||
emit( atlasPreviewFeatureChanged() );
|
||||
}
|
||||
|
||||
@ -3573,7 +3573,7 @@ void QgsComposer::updateAtlasMapLayerAction( QgsVectorLayer *coverageLayer )
|
||||
{
|
||||
mAtlasFeatureAction = new QgsMapLayerAction( QString( tr( "Set as atlas feature for %1" ) ).arg( mTitle ), this, coverageLayer, QgsMapLayerAction::SingleFeature );
|
||||
QgsMapLayerActionRegistry::instance()->addMapLayerAction( mAtlasFeatureAction );
|
||||
connect( mAtlasFeatureAction, SIGNAL( triggeredForFeature( QgsMapLayer*, const QgsFeature* ) ), this, SLOT( setAtlasFeature( QgsMapLayer*, const QgsFeature* ) ) );
|
||||
connect( mAtlasFeatureAction, SIGNAL( triggeredForFeature( QgsMapLayer*, const QgsFeature& ) ), this, SLOT( setAtlasFeature( QgsMapLayer*, const QgsFeature& ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3618,7 +3618,7 @@ void QgsComposer::updateAtlasMapLayerAction( bool atlasEnabled )
|
||||
QgsAtlasComposition& atlas = mComposition->atlasComposition();
|
||||
mAtlasFeatureAction = new QgsMapLayerAction( QString( tr( "Set as atlas feature for %1" ) ).arg( mTitle ), this, atlas.coverageLayer(), QgsMapLayerAction::SingleFeature );
|
||||
QgsMapLayerActionRegistry::instance()->addMapLayerAction( mAtlasFeatureAction );
|
||||
connect( mAtlasFeatureAction, SIGNAL( triggeredForFeature( QgsMapLayer*, const QgsFeature* ) ), this, SLOT( setAtlasFeature( QgsMapLayer*, const QgsFeature* ) ) );
|
||||
connect( mAtlasFeatureAction, SIGNAL( triggeredForFeature( QgsMapLayer*, const QgsFeature& ) ), this, SLOT( setAtlasFeature( QgsMapLayer*, const QgsFeature& ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -620,7 +620,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
|
||||
|
||||
//! Sets the specified feature as the current atlas feature
|
||||
//! @note added in 2.1
|
||||
void setAtlasFeature( QgsMapLayer* layer, const QgsFeature *feat );
|
||||
void setAtlasFeature( QgsMapLayer* layer, const QgsFeature &feat );
|
||||
|
||||
//! Updates the "set as atlas feature" map layer action when atlas coverage layer changes
|
||||
void updateAtlasMapLayerAction( QgsVectorLayer* coverageLayer );
|
||||
|
Loading…
x
Reference in New Issue
Block a user