Skip to content
Permalink
Browse files
[layertree] Use QgisApp implementation of remove layers
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 124007404a7e3d0c079223a4a495d688895df617
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/app/qgsapplayertreeviewmenuprovider.cpp
@@ -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() ) );
@@ -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() ) );

0 comments on commit 1240074

Please sign in to comment.