Skip to content
Permalink
Browse files

folowup a29c6a7: set noun to entries

  • Loading branch information
slarosa authored and nyalldawson committed Mar 28, 2018
1 parent 44143c1 commit 79005705044cf8c90e30d9f316f827fa0d078bc2
@@ -87,7 +87,7 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()

menu->addSeparator();
menu->addAction( actions->actionAddGroup( menu ) );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRemoveLayer.svg" ) ), tr( "&Remove…" ), QgisApp::instance(), SLOT( removeLayer() ) );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRemoveLayer.svg" ) ), tr( "&Remove Group" ), QgisApp::instance(), SLOT( removeLayer() ) );
menu->addSeparator();

menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSetCRS.png" ) ),
@@ -158,8 +158,8 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
menu->addSeparator();

// duplicate layer
QAction *duplicateLayersAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateLayer.svg" ) ), tr( "&Duplicate" ), QgisApp::instance(), SLOT( duplicateLayers() ) );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRemoveLayer.svg" ) ), tr( "&Remove…" ), QgisApp::instance(), SLOT( removeLayer() ) );
QAction *duplicateLayersAction = menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateLayer.svg" ) ), tr( "&Duplicate Layer" ), QgisApp::instance(), SLOT( duplicateLayers() ) );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRemoveLayer.svg" ) ), tr( "&Remove Layer" ), QgisApp::instance(), SLOT( removeLayer() ) );

menu->addSeparator();

@@ -60,7 +60,17 @@ QAction *QgsLayerTreeViewDefaultActions::actionShowInOverview( QObject *parent )

QAction *QgsLayerTreeViewDefaultActions::actionRenameGroupOrLayer( QObject *parent )
{
QAction *a = new QAction( tr( "Re&name" ), parent );
QgsLayerTreeNode *node = mView->currentNode();
if ( !node )
return nullptr;

QString text;
if ( QgsLayerTree::isGroup( node ) )
text = tr( "Re&name Group" );
else
text = tr( "Re&name Layer" );

QAction *a = new QAction( text, parent );
connect( a, &QAction::triggered, this, &QgsLayerTreeViewDefaultActions::renameGroupOrLayer );
return a;
}

0 comments on commit 7900570

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