Skip to content

Commit 57b5eb9

Browse files
committed
On duplicate copy join and virtual fields
Fixes #14191
1 parent 0e3faf7 commit 57b5eb9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/app/qgisapp.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -7812,6 +7812,15 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *>& lyrList )
78127812
QgsExpressionContextUtils::setLayerVariable( dupVLayer, variableName, varValue );
78137813
}
78147814

7815+
Q_FOREACH ( const QgsVectorJoinInfo& join, vlayer->vectorJoins() )
7816+
dupVLayer->addJoin( join );
7817+
7818+
for ( int fld = 0; fld < vlayer->fields().count(); fld++ )
7819+
{
7820+
if ( vlayer->fields().fieldOrigin( fld ) == QgsFields::OriginExpression )
7821+
dupVLayer->addExpressionField( vlayer->expressionField( fld ), vlayer->fields().at( fld ) );
7822+
}
7823+
78157824
dupLayer = dupVLayer;
78167825
}
78177826
}

0 commit comments

Comments
 (0)