Skip to content

Commit

Permalink
[layertree] Use QgisApp implementation of remove layers
Browse files Browse the repository at this point in the history
That one also asks whether to 1. save changes to layers, 2. really remove
  • Loading branch information
wonder-sk committed May 26, 2014
1 parent 8499b4d commit 1240074
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -44,7 +44,8 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
if ( QgsLayerTree::isGroup( node ) )
{
menu->addAction( actions->actionZoomToGroup( mCanvas, menu ) );
menu->addAction( actions->actionRemoveGroupOrLayer( menu ) );

menu->addAction( QgsApplication::getThemeIcon( "/mActionRemoveLayer.svg" ), tr( "&Remove" ), QgisApp::instance(), SLOT( removeLayer() ) );

menu->addAction( QgsApplication::getThemeIcon( "/mActionSetCRS.png" ),
tr( "&Set Group CRS" ), QgisApp::instance(), SLOT( legendGroupSetCRS() ) );
Expand Down Expand Up @@ -72,7 +73,7 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
menu->addAction( tr( "&Stretch Using Current Extent" ), QgisApp::instance(), SLOT( legendLayerStretchUsingCurrentExtent() ) );
}

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

// duplicate layer
QAction* duplicateLayersAction = menu->addAction( QgsApplication::getThemeIcon( "/mActionDuplicateLayer.svg" ), tr( "&Duplicate" ), QgisApp::instance(), SLOT( duplicateLayers() ) );
Expand Down

0 comments on commit 1240074

Please sign in to comment.