Skip to content
Permalink
Browse files

Copy joins on duplicate layer. Fix #8243

  • Loading branch information
NathanW2 committed Jul 11, 2013
1 parent f5632b6 commit 9ed180303c8f4172c9c6155e9cb226f79fc734b4
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/app/qgisapp.cpp
@@ -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

0 comments on commit 9ed1803

Please sign in to comment.
You can’t perform that action at this time.