Skip to content

Commit

Permalink
folowup a29c6a7: set noun to entries
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa authored and nyalldawson committed Mar 29, 2018
1 parent 44143c1 commit 7900570
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -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" ) ),
Expand Down Expand Up @@ -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();

Expand Down
12 changes: 11 additions & 1 deletion src/gui/layertree/qgslayertreeviewdefaultactions.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7900570

Please sign in to comment.