Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent 9124100 commit a0166d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 1 addition & 7 deletions src/app/qgsbrowserdockwidget.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -547,11 +546,6 @@ void QgsBrowserDockWidget::addLayerAtIndex( const QModelIndex& index )
}
}

void QgsBrowserDockWidget::addCurrentLayer()
{
addLayerAtIndex( mBrowserView->currentIndex() );
}

void QgsBrowserDockWidget::addSelectedLayers()
{
QApplication::setOverrideCursor( Qt::WaitCursor );
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsbrowserdockwidget.h
Expand Up @@ -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();
Expand Down

0 comments on commit a0166d9

Please sign in to comment.