Skip to content

Commit

Permalink
[composer] Prevent multiple calculation of data defined properties
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 30, 2014
1 parent 6f4a28f commit f23e38d
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/core/composer/qgscomposeritem.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,6 @@ void QgsComposerItem::init( const bool manageZValue )
mDataDefinedNames.insert( QgsComposerObject::Transparency, QString( "dataDefinedTransparency" ) );
mDataDefinedNames.insert( QgsComposerObject::BlendMode, QString( "dataDefinedBlendMode" ) );
mDataDefinedNames.insert( QgsComposerObject::ExcludeFromExports, QString( "dataDefinedExcludeExports" ) );

if ( mComposition )
{
//connect to atlas toggling on/off and coverage layer and feature changes
//to update data defined values
connect( &mComposition->atlasComposition(), SIGNAL( toggled( bool ) ), this, SLOT( refreshDataDefinedProperty() ) );
connect( &mComposition->atlasComposition(), SIGNAL( coverageLayerChanged( QgsVectorLayer* ) ), this, SLOT( refreshDataDefinedProperty() ) );
connect( &mComposition->atlasComposition(), SIGNAL( featureChanged( QgsFeature* ) ), this, SLOT( refreshDataDefinedProperty() ) );
//also, refreshing composition triggers a recalculation of data defined properties
connect( mComposition, SIGNAL( refreshItemsTriggered() ), this, SLOT( refreshDataDefinedProperty() ) );

//toggling atlas or changing coverage layer requires data defined expressions to be reprepared
connect( &mComposition->atlasComposition(), SIGNAL( toggled( bool ) ), this, SLOT( prepareDataDefinedExpressions() ) );
connect( &mComposition->atlasComposition(), SIGNAL( coverageLayerChanged( QgsVectorLayer* ) ), this, SLOT( prepareDataDefinedExpressions() ) );
}
}

QgsComposerItem::~QgsComposerItem()
Expand Down

0 comments on commit f23e38d

Please sign in to comment.