Skip to content
Permalink
Browse files

all features option in menu

means this can be controlled by the user

fixes #17853
  • Loading branch information
signedav committed Oct 18, 2018
1 parent b38e183 commit 8839e2fc0cb48e54289949fe40b59cb62951f91c
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/app/qgsmaptoolfeatureaction.cpp
@@ -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." ) );
}

@@ -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;

0 comments on commit 8839e2f

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