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.
* Load the default relation editor if the relation editor type setting is missing
* Add setDefaultWidgetType and defaultWidgetType to the relation editor registry
* Use the new defaultWidgetType() when relation editor type setting is missing
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
line, not processing.execAlgorithmDialog
We want this line to be copy/pastable into a script which executes
the algorithm without user interaction, same as QGIS <= 3.18
Followup https://github.com/qgis/QGIS/pull/42541
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.
which are subrenderers for other renderers
Symbol layers have no effect in this situation (e.g. when a categorized
renderer is used as a subrenderer for point displacement renderer), so
don't show the option in the GUI
Instead of directly changing the renderer in place in the symbol levels
widget, we delegate responsibility for handling the changes to symbol
levels to the parent QgsRendererWidget subclass. This allows us to
implement different logic in the various subclasses which correctly
handle how that particular widget subclass should update any internal
symbol references and ultimately update the renderer.
Fixes instability and crashes after editing symbol levels.
Fixes#42671