Skip to content

Commit

Permalink
Merge pull request #3511 from nyalldawson/depend_redraw
Browse files Browse the repository at this point in the history
If a dependent layer is redrawn, then also redraw child layer
  • Loading branch information
Hugo Mercier authored Oct 3, 2016
2 parents 8e54acf + 5284fef commit 8c90f7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4134,6 +4134,7 @@ bool QgsVectorLayer::setDependencies( const QSet<QgsMapLayerDependency>& oDeps )
disconnect( lyr, SIGNAL( featureDeleted( QgsFeatureId ) ), this, SIGNAL( dataChanged() ) );
disconnect( lyr, SIGNAL( geometryChanged( QgsFeatureId, const QgsGeometry& ) ), this, SIGNAL( dataChanged() ) );
disconnect( lyr, SIGNAL( dataChanged() ), this, SIGNAL( dataChanged() ) );
disconnect( lyr, SIGNAL( repaintRequested() ), this, SLOT( triggerRepaint() ) );
}

// assign new dependencies
Expand All @@ -4153,6 +4154,7 @@ bool QgsVectorLayer::setDependencies( const QSet<QgsMapLayerDependency>& oDeps )
connect( lyr, SIGNAL( featureDeleted( QgsFeatureId ) ), this, SIGNAL( dataChanged() ) );
connect( lyr, SIGNAL( geometryChanged( QgsFeatureId, const QgsGeometry& ) ), this, SIGNAL( dataChanged() ) );
connect( lyr, SIGNAL( dataChanged() ), this, SIGNAL( dataChanged() ) );
connect( lyr, SIGNAL( repaintRequested() ), this, SLOT( triggerRepaint() ) );
}

// if new layers are present, emit a data change
Expand Down

0 comments on commit 8c90f7d

Please sign in to comment.