Add mechanism to defer updates of rubber bands when adding multiple
geometries
GREATLY speeds up rubber band creation for many geometries, resulting
in consequent speed ups to the move features tool, rotate features tool,
....
Adds the geometry of an existing feature to a rubberband
This is useful for multi feature highlighting.
As of 2.0, this method does not change the GeometryType any more. You need to set the GeometryType
of the rubberband explicitly by calling :py:func:`~QgsRubberBand.reset` or :py:func:`~QgsRubberBand.setToGeometry` with appropriate arguments.
:py:func:`~QgsRubberBand.setToGeometry` is also to be preferred for backwards-compatibility.
If additional geometries are to be added then set ``doUpdate`` to ``False`` to defer costly repaint and bounding rectangle calculations for better performance.
After adding the final geometry :py:func:`~QgsRubberBand.updatePosition` should be called.
:param geometry: the geometry object. Will be treated as a collection of vertices.
:param layer: the layer containing the feature, used for coord transformation to map
crs. If ``layer`` is ``None``, the coordinates are not going to be transformed.
:param doUpdate: set to ``False`` to defer updates of the rubber band.
If ``crs`` is specified, the geometry will be automatically reprojected from ``crs``
to the canvas CRS.
If additional geometries are to be added then set ``doUpdate`` to ``False`` to defer costly repaint and bounding rectangle calculations for better performance.
After adding the final geometry :py:func:`~QgsRubberBand.updatePosition` should be called.
@@ -324,21 +324,28 @@ class GUI_EXPORT QgsRubberBand : public QgsMapCanvasItem
* of the rubberband explicitly by calling reset() or setToGeometry() with appropriate arguments.
* setToGeometry() is also to be preferred for backwards-compatibility.
*
* If additional geometries are to be added then set \a doUpdate to FALSE to defer costly repaint and bounding rectangle calculations for better performance.
* After adding the final geometry updatePosition() should be called.
*
* \param geometry the geometry object. Will be treated as a collection of vertices.
* \param layer the layer containing the feature, used for coord transformation to map
* crs. If \a layer is NULLPTR, the coordinates are not going to be transformed.
* \param doUpdate set to FALSE to defer updates of the rubber band.
* If \a crs is specified, the geometry will be automatically reprojected from \a crs
* to the canvas CRS.
*
* If additional geometries are to be added then set \a doUpdate to FALSE to defer costly repaint and bounding rectangle calculations for better performance.
* After adding the final geometry updatePosition() should be called.