Follow up 56f7812ca1e
This commit fixed the ordering of features coming from the
vector layer cache for the attribute table, but came with a massive
speed impact due to the repeated calls QList::contains for
every feature fetched. For any moderately sized table or above
these calls stacked up into multiple minute delays in opening
the table.
Avoid this by tracking the added feature ids in a separate
unordered set, so that we don't need to check through the
ordered list for existing features at all.
Eg a 500k feature gpkg was taking 10 minutes to open the table.
With this optimization that's back down to 20 seconds.
This is not thread safe at all - we cannot access a layer from
an iterator, as iterators may be running on background threads.
Instead use a thread safe approach of storing a QgsVectorLayerFeatureSource
and using that instead
Fixes#38551
Allows users to manually opt-out of monitoring directories in
the browser by default, and also provides a mechanism for
enterprise installs to disable this potentially unwanted behavior.
are slow
Effectively this means that the browser no longer defaults to watching
network and remote drives (on Windows) for changes. This is expensive
to do and can result in large hangs in the QGIS application.
Users can still manually opt-in to monitoring of these locations
through the context menu of the directory in the browser panel.
items should be automatically monitored for changes
This monitoring can be expensive for some locations (eg network
folders or cloud based directories), so in these cases it is
desirable to allow it to be disabled to avoid hangs in the QGIS
application.
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts
Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)
Fixes#42996
QFlags created from enum classes aren't automatically converted
from an int value passed by Python code, so we need to create
compatibility functions for the older variants which accept
plain ints
should use symbol levels whenever that symbol is used by the renderer
Not exposed to users -- only settable via API, but IS saved in the
symbol's XML definition and restored when loading a symbol from XML.
not QgsPointXY as indicated by the documentation
Also add support for constructing QgsLineString using arrays of
arrays of floats, given that we're having to hand-roll sip conversion
code anyway!
Now the following is supported:
line = QgsLineString([[1,2], [3,4], [5,6]])
which is much nicer and more "pythonic" then the explicit
QgsPoint/QgsPointXY sequences!
Fixes#43200
project are not available when loading that project on a system
without the required fonts installed
Currently shown for any QgsTextForamt or font marker symbol layer
restored when opening the project
Avoids the need to remove const from all the QgsReadWriteContext
references used throughout QGIS XML loading just to be able to
push warning messages to the context.
Returns a reference to the simplest lossless representation of this geometry,
e.g. if the geometry is a multipart geometry type with a single member geometry,
a reference to that part will be returned.
This method employs the following logic:
- For multipart geometries containing a single part only a direct reference to that part will be returned.
- For compound curve geometries containing a single curve only a direct reference to that curve will be returned.
This method returns a reference only, and does not involve any geometry cloning.
configuration is set when changing a vector layer's style preset
This causes the layer styling dock to update before the layer's
new labeling settings are set, so the dock shows the incorrect
label settings for the previously used style
Fixes#42310