mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Merge pull request #2816 from SebDieBln/FixDuplicateJoins
[Bugfix] create vector joins only once for a duplicated layer (fixes #14298)
This commit is contained in:
commit
0c0d72bb03
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user