Skip to content

Commit

Permalink
Avoid more old-style connects
Browse files Browse the repository at this point in the history
(cherry picked from commit 74c6946)
(cherry picked from commit 87bb5a0)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent 15e8cf5 commit 3ebcc77
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/gui/attributetable/qgsdualview.cpp
Expand Up @@ -709,9 +709,14 @@ void QgsDualView::viewWillShowContextMenu( QMenu *menu, const QModelIndex &atInd
QgsMapCanvas *canvas = mFilterModel->mapCanvas();
if ( canvas && vl && vl->geometryType() != QgsWkbTypes::NullGeometry )
{
menu->addAction( tr( "Zoom to Feature" ), this, SLOT( zoomToCurrentFeature() ) );
menu->addAction( tr( "Pan to Feature" ), this, SLOT( panToCurrentFeature() ) );
menu->addAction( tr( "Flash Feature" ), this, SLOT( flashCurrentFeature() ) );
QAction *zoomToFeatureAction = menu->addAction( tr( "Zoom to Feature" ) );
connect( zoomToFeatureAction, &QAction::triggered, this, &QgsDualView::zoomToCurrentFeature );

QAction *panToFeatureAction = menu->addAction( tr( "Pan to Feature" ) );
connect( panToFeatureAction, &QAction::triggered, this, &QgsDualView::panToCurrentFeature );

QAction *flashFeatureAction = menu->addAction( tr( "Flash Feature" ) );
connect( flashFeatureAction, &QAction::triggered, this, &QgsDualView::flashCurrentFeature );
}

//add user-defined actions to context menu
Expand Down

0 comments on commit 3ebcc77

Please sign in to comment.