Skip to content
Permalink
Browse files

Avoid more old-style connects

(cherry picked from commit 74c6946)
(cherry picked from commit 87bb5a0)
  • Loading branch information
nyalldawson committed Jun 19, 2020
1 parent 15e8cf5 commit 3ebcc773591c3e91ce08df7709a31d467a5397fb
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/gui/attributetable/qgsdualview.cpp
@@ -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

0 comments on commit 3ebcc77

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