Skip to content

Commit

Permalink
Fix quasi-leak in attribute table right click menu
Browse files Browse the repository at this point in the history
The actions should be parented to the menu, not the form, or they'll
exist for the lifetime of the form instead of the menu
  • Loading branch information
nyalldawson committed Jun 2, 2020
1 parent da091cf commit df41d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -741,7 +741,7 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &maste
return;
}

QAction *copyContentAction = new QAction( tr( "Copy Cell Content" ), this );
QAction *copyContentAction = menu->addAction( tr( "Copy Cell Content" ) );
menu->addAction( copyContentAction );
connect( copyContentAction, &QAction::triggered, this, [masterIndex, this]
{
Expand Down

0 comments on commit df41d78

Please sign in to comment.