- Switch to flags instead of boolean argument
- Move logic for layer validity to canRunUsingLayer
- Add unit test
Also remove settings flag to hide duplicate features action
This fixes issues in situations when there are multiple vertices in one location:
1. when clicking a location, if there are selected features,
the closest vertex from a selected feature will be used with priority.
2. when dragging a rectangle, if there is a selected feature,
only vertices from selected features will be used.
If there is selection in any editable layers, but away from the location where
user clicked to pick vertex (or dragged rectangle to pick multiple vertices),
the existing vertex tool behavior is not affected (so it cannot happen that
vertex tool suddenly appears to have stopped working just because there is
selection somewhere possibly outside of the current map view).
We only previously had methods for exact intersections - this
commit adds a new QgsGeometry.boundingBoxIntersects() method
which can be used to test if just the bounding boxes of
geometries/rectangles intersect.
It's fast, and doesn't care about invalid geometries (unlike
the exact intersects checks)
Before a filter rect request would usually force fetching every
single feature from the server before the request could be
complete.
Instead, if a filter rect is passed we first obtain a list
from the server of matching features within this rect, and
then iterate only over those.
Fixes broken (multi-minute hang) identify tool use on AFS
layers.
Turns out the useful methods in QStyleOptionGraphicsItem were deprecated
in Qt 5.10. To future protect our API this replaces all public
use of QStyleOptionGraphicsItem, so that we're free to revise
the internals of how we use QStyleOptionGraphicsItem without breaking
the public QGIS API.
Turns out editable joins rely on this situation. Instead change
the providers to warn on this occurance, and make the memory
provider alone truncate the extra attributes (since it doesn't
have an external backend or disk based format which natively
applies this truncation)
with MORE attributes than expected results in a failure
We need to flag these and not silently discard the extra
attributes resulting in loss of information -- if thisi
situation occurs there's a deeper bug present whic
needs to be addressed.
Ensure that features added to a memory provider (and returned when
fetching features from a memory provider) always have the correct
number of attributes present.
Fixes many random behavior bugs when working with memory providers.