Skip to content
Permalink
Browse files

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

  • Loading branch information
nyalldawson committed Mar 19, 2018
1 parent 732c526 commit 20d9427c2628cec2d2d2f2e57198d5eca66dddf0
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/app/qgisapp.cpp
@@ -9234,7 +9234,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();
@@ -9298,6 +9298,8 @@ void QgisApp::duplicateLayers( const QList<QgsMapLayer *> &lyrList )
continue;
}

dupLayer->setName( layerDupName );

// add layer to layer registry and legend
QList<QgsMapLayer *> myList;
myList << dupLayer;
@@ -9332,7 +9334,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 20d9427

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