Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix quasi-leak in attribute table right click menu
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

(cherry picked from commit 1b3b8c3)
(cherry picked from commit d845b76)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent c40bc94 commit 1283ea3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -696,7 +696,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 1283ea3

Please sign in to comment.