Skip to content

Commit

Permalink
all features option in menu
Browse files Browse the repository at this point in the history
means this can be controlled by the user

fixes #17853
  • Loading branch information
signedav committed Oct 18, 2018
1 parent b38e183 commit 8839e2f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/app/qgsmaptoolfeatureaction.cpp
Expand Up @@ -75,7 +75,7 @@ void QgsMapToolFeatureAction::canvasReleaseEvent( QgsMapMouseEvent *e )
return;
}

if ( !doAction( vlayer, e->x(), e->y(), e->pixelPoint() ) )
if ( !doAction( vlayer, e->x(), e->y(), e->originalPixelPoint() ) )
QgisApp::instance()->statusBarIface()->showMessage( tr( "No features at this position found." ) );
}

Expand Down Expand Up @@ -142,6 +142,15 @@ bool QgsMapToolFeatureAction::doAction( QgsVectorLayer *layer, int x, int y, QPo
QAction *featureAction = featureMenu->addAction( FID_TO_STRING( features.at( i ).id() ) );
connect( featureAction, &QAction::triggered, this, [ = ] { doActionForFeature( layer, features.at( i ), point );} );
}
QAction *allFeatureAction = featureMenu->addAction( tr( "All Features" ) );
connect( allFeatureAction, &QAction::triggered, this, [ = ]
{
for ( int i = 0; i < features.count(); i++ )
{
doActionForFeature( layer, features.at( i ), point );
}
} );

featureMenu->exec( pixelpos );
}
return true;
Expand Down

0 comments on commit 8839e2f

Please sign in to comment.