Skip to content
Permalink
Browse files

Fix missing '(copy)' suffix on names of newly duplicated layers

(cherry-picked from 20d9427)
  • Loading branch information
nyalldawson committed Mar 19, 2018
1 parent c167567 commit d2257533fd786d2362bde35141ef176aa236205a
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgisapp.cpp
@@ -9167,7 +9167,7 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &lyrList )
QString layerDupName, unSppType;
QList<QgsMessageBarItem *> msgBars;

Q_FOREACH ( QgsMapLayer *selectedLyr, selectedLyrs )
for ( QgsMapLayer *selectedLyr : selectedLyrs )
{
dupLayer = nullptr;
unSppType.clear();
@@ -9231,6 +9231,8 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &lyrList )
continue;
}

dupLayer->setName( layerDupName );

// add layer to layer registry and legend
QList<QgsMapLayer *> myList;
myList << dupLayer;
@@ -9265,7 +9267,7 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &lyrList )
freezeCanvases( false );

// display errors in message bar after duplication of layers
Q_FOREACH ( QgsMessageBarItem *msgBar, msgBars )
for ( QgsMessageBarItem *msgBar : qgis::as_const( msgBars ) )
{
mInfoBar->pushItem( msgBar );
}

0 comments on commit d225753

Please sign in to comment.
You can’t perform that action at this time.