Skip to content
Permalink
Browse files

only show if the context menu is shown over a selected row

  • Loading branch information
3nids committed Feb 4, 2020
1 parent d53bab5 commit b9c036d074a7ef1f2a20f83009a768977b7551fb
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/attributetable/qgsdualview.cpp
@@ -721,7 +721,9 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
}

// entries for multiple features layer actions
if ( mLayer->selectedFeatureCount() > 1 )
// only show if the context menu is shown over a selected row
QgsFeatureId currentFid = masterModel()->rowToId( sourceIndex.row() );
if ( mLayer->selectedFeatureCount() > 1 && mLayer->selectedFeatureIds().contains( currentFid ) )
{
const QList<QgsMapLayerAction *> constRegisteredActions = QgsGui::mapLayerActionRegistry()->mapLayerActions( mLayer, QgsMapLayerAction::MultipleFeatures );
if ( !constRegisteredActions.isEmpty() )

0 comments on commit b9c036d

Please sign in to comment.
You can’t perform that action at this time.