[needs-docs] Remove duplicate Add Layer option from browser context menu

Instead of two actions: Add Layer & Add Selected Layers, just have
a single Add Selected Layers action which works on either multiple
selections or single selections
This commit is contained in:
Nyall Dawson 2017-01-23 14:33:15 +10:00
parent 9124100fb6
commit a0166d94c7
2 changed files with 1 additions and 8 deletions

View File

@ -405,8 +405,7 @@ void QgsBrowserDockWidget::showContextMenu( QPoint pt )
}
else if ( item->type() == QgsDataItem::Layer )
{
menu->addAction( tr( "Add Layer" ), this, SLOT( addCurrentLayer() ) );
menu->addAction( tr( "Add Selected Layers" ), this, SLOT( addSelectedLayers() ) );
menu->addAction( tr( "Add Selected Layer(s)" ), this, SLOT( addSelectedLayers() ) );
menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
}
else if ( item->type() == QgsDataItem::Favorites )
@ -547,11 +546,6 @@ void QgsBrowserDockWidget::addLayerAtIndex( const QModelIndex& index )
}
}
void QgsBrowserDockWidget::addCurrentLayer()
{
addLayerAtIndex( mBrowserView->currentIndex() );
}
void QgsBrowserDockWidget::addSelectedLayers()
{
QApplication::setOverrideCursor( Qt::WaitCursor );

View File

@ -126,7 +126,6 @@ class APP_EXPORT QgsBrowserDockWidget : public QgsDockWidget, private Ui::QgsBro
void setFilter();
// layer menu items
void addCurrentLayer();
void addSelectedLayers();
void showProperties();
void hideItem();