diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index e4f3b1f7a45d..3dec0e6039dd 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -11766,6 +11766,12 @@ void QgisApp::duplicateLayers( const QList &lyrList ) // always set duplicated layers to not visible so layer can be configured before being turned on nodeDupLayer->setItemVisibilityChecked( false ); + // duplicate the layer tree layer's custom properties + for ( const QString &key : nodeSelectedLyr->customProperties() ) + { + nodeDupLayer->setCustomProperty( key, nodeSelectedLyr->customProperty( key ) ); + } + // duplicate the layer style QString errMsg; QDomDocument style;