Merge pull request #2816 from SebDieBln/FixDuplicateJoins

[Bugfix] create vector joins only once for a duplicated layer (fixes #14298)
This commit is contained in:
Matthias Kuhn 2016-02-20 11:38:57 +01:00
commit 0c0d72bb03

View File

@ -7886,16 +7886,6 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *>& lyrList )
messageBar()->pushMessage( errMsg,
tr( "Cannot copy style to duplicated layer." ),
QgsMessageBar::CRITICAL, messageTimeout() );
QgsVectorLayer* vLayer = dynamic_cast<QgsVectorLayer*>( selectedLyr );
QgsVectorLayer* vDupLayer = dynamic_cast<QgsVectorLayer*>( dupLayer );
if ( vLayer && vDupLayer )
{
Q_FOREACH ( const QgsVectorJoinInfo& join, vLayer->vectorJoins() )
{
vDupLayer->addJoin( join );
}
}
}
dupLayer = nullptr;