Skip to content

Commit 7900570

Browse files
slarosanyalldawson
authored andcommitted
folowup a29c6a7: set noun to entries
1 parent 44143c1 commit 7900570

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/app/qgsapplayertreeviewmenuprovider.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
8787

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

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

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

164164
menu->addSeparator();
165165

src/gui/layertree/qgslayertreeviewdefaultactions.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,17 @@ QAction *QgsLayerTreeViewDefaultActions::actionShowInOverview( QObject *parent )
6060

6161
QAction *QgsLayerTreeViewDefaultActions::actionRenameGroupOrLayer( QObject *parent )
6262
{
63-
QAction *a = new QAction( tr( "Re&name" ), parent );
63+
QgsLayerTreeNode *node = mView->currentNode();
64+
if ( !node )
65+
return nullptr;
66+
67+
QString text;
68+
if ( QgsLayerTree::isGroup( node ) )
69+
text = tr( "Re&name Group" );
70+
else
71+
text = tr( "Re&name Layer" );
72+
73+
QAction *a = new QAction( text, parent );
6474
connect( a, &QAction::triggered, this, &QgsLayerTreeViewDefaultActions::renameGroupOrLayer );
6575
return a;
6676
}

0 commit comments

Comments
 (0)