[QGIS-Developer] Inconsistency between the behaviors of "Identify Features" and "Select Features"

Paolo Tormene paolo.tormene at globalquakemodel.org
Wed Jul 31 07:38:05 PDT 2019


Hello. I have a question about an inconsistency between the tool "Select
Features by area or single click" and the tool "Identify Features", that
happens in case you have in the same layer multiple point features
overlapping at the same coordinates.
When you use "Identify Features", and click on a point, you will find in
"Identify Results" information about all the features at that site.
Using "Select Features by area or single click", you have different
behaviors depending on how you make the selection: if you draw with the
mouse a square that includes the coordinates of your overlapping points,
all those points are selected; if you just click on the point (you see only
one, because they are overlapping), just one of those points is selected,
and there is no obvious criterion to know in advance which of them will be
selected. IMHO, this looks a bit counter-intuitive.
In my case, I made a little workaround in pyqt, adding to my plugin a
checkbox to let the users choose if they want to automatically select all
the features that are at the same coordinates of the clicked one (it
leverages the signal QgsVectorLayer.selectionChanged and uses
QgsVectorLayer.selectByExpression to modify the selection on-the-fly if
needed).
I am curious, anyway, if this behavior of the feature selector is expected
and if it was made on purpose.
Thank you in advance,
Paolo

-- 

*PAOLO TORMENE* senior software developer +39 0382 5169882

*GLOBAL EARTHQUAKE MODEL * working together to assess risk

*GEM -* globalquakemodel.org <http://www.globalquakemodel.org> *T -*
@GEMwrld <http://twitter.com/GEMwrld> *F -* GEMwrld
<http://www.facebook.com/GEMwrld>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20190731/9ff937ac/attachment.html>


More information about the QGIS-Developer mailing list