Skip to content

Commit a0166d9

Browse files
committed
[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
1 parent 9124100 commit a0166d9

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

‎src/app/qgsbrowserdockwidget.cpp‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,7 @@ void QgsBrowserDockWidget::showContextMenu( QPoint pt )
405405
}
406406
else if ( item->type() == QgsDataItem::Layer )
407407
{
408-
menu->addAction( tr( "Add Layer" ), this, SLOT( addCurrentLayer() ) );
409-
menu->addAction( tr( "Add Selected Layers" ), this, SLOT( addSelectedLayers() ) );
408+
menu->addAction( tr( "Add Selected Layer(s)" ), this, SLOT( addSelectedLayers() ) );
410409
menu->addAction( tr( "Properties..." ), this, SLOT( showProperties() ) );
411410
}
412411
else if ( item->type() == QgsDataItem::Favorites )
@@ -547,11 +546,6 @@ void QgsBrowserDockWidget::addLayerAtIndex( const QModelIndex& index )
547546
}
548547
}
549548

550-
void QgsBrowserDockWidget::addCurrentLayer()
551-
{
552-
addLayerAtIndex( mBrowserView->currentIndex() );
553-
}
554-
555549
void QgsBrowserDockWidget::addSelectedLayers()
556550
{
557551
QApplication::setOverrideCursor( Qt::WaitCursor );

‎src/app/qgsbrowserdockwidget.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ class APP_EXPORT QgsBrowserDockWidget : public QgsDockWidget, private Ui::QgsBro
126126
void setFilter();
127127

128128
// layer menu items
129-
void addCurrentLayer();
130129
void addSelectedLayers();
131130
void showProperties();
132131
void hideItem();

0 commit comments

Comments
 (0)