Skip to content

Commit

Permalink
Copy joins on duplicate layer. Fix #8243
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jul 11, 2013
1 parent f5632b6 commit 9ed1803
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6187,6 +6187,16 @@ void QgisApp::duplicateLayers( QList<QgsMapLayer *> lyrList )
copyStyle( selectedLyr );
pasteStyle( dupLayer );

QgsVectorLayer* vLayer = dynamic_cast<QgsVectorLayer*>( selectedLyr );
QgsVectorLayer* vDupLayer = dynamic_cast<QgsVectorLayer*>( dupLayer );
if ( vLayer && vDupLayer )
{
foreach( const QgsVectorJoinInfo join, vLayer->vectorJoins() )
{
vDupLayer->addJoin( join );
}
}

// always set duplicated layers to not visible
// so layer can be configured before being turned on,
// and no map canvas refresh needed when doing multiple duplications
Expand Down

0 comments on commit 9ed1803

Please sign in to comment.