Skip to content

Commit

Permalink
When duplicating a layer copy layer tree layer's custom properties [f…
Browse files Browse the repository at this point in the history
…ixes #60884]
  • Loading branch information
Alex-Kent authored and nyalldawson committed Mar 11, 2025
1 parent c2b726d commit d6f93cb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11767,6 +11767,12 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &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;
Expand Down

0 comments on commit d6f93cb

Please sign in to comment.