Skip to content

Commit

Permalink
Attribute table: please don't delete randomly!
Browse files Browse the repository at this point in the history
Fixes #32933

Pretty big fat bug isn't it ?
  • Loading branch information
elpaso authored and nyalldawson committed Nov 20, 2019
1 parent 39741e5 commit ea38fce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gui/attributetable/qgsfeaturelistview.cpp
Expand Up @@ -325,7 +325,11 @@ void QgsFeatureListView::contextMenuEvent( QContextMenuEvent *event )

QgsActionMenu *menu = new QgsActionMenu( mModel->layerCache()->layer(), feature, QStringLiteral( "Feature" ), this );

emit willShowContextMenu( menu, index );
// Index is from feature list model, but we need an index from the
// filter model to be passed to listeners, using fid instead would
// have been much better in term of bugs (and headaches) but this
// belongs to the API unfortunately.
emit willShowContextMenu( menu, mModel->mapToSource( index ) );

menu->exec( event->globalPos() );
}
Expand Down

0 comments on commit ea38fce

Please sign in to comment.