mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[layertree] Use QgisApp implementation of remove layers
That one also asks whether to 1. save changes to layers, 2. really remove
This commit is contained in:
parent
8499b4d07c
commit
124007404a
@ -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() ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user