Skip to content
Permalink
Browse files
Spelling
  • Loading branch information
nyalldawson committed Sep 8, 2021
1 parent ec9d526 commit bd8a8d574479ab97c64e240899189c7ce32364a1
@@ -293,7 +293,7 @@ If additional geometries are to be added then set ``doUpdate`` to ``False`` to d
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 associated with the geometry. This is used for transforming the geometry from the layer's CRS to themap crs. If ``layer`` is ``None`` no coordinate transformation will occur.
:param layer: the layer associated with the geometry. This is used for transforming the geometry from the layer's CRS to the map crs. If ``layer`` is ``None`` no coordinate transformation will occur.
:param doUpdate: set to ``False`` to defer updates of the rubber band.
%End

@@ -337,7 +337,7 @@ class GUI_EXPORT QgsRubberBand : public QgsMapCanvasItem
* 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 associated with the geometry. This is used for transforming the geometry from the layer's CRS to themap crs. If \a layer is NULLPTR no coordinate transformation will occur.
* \param layer the layer associated with the geometry. This is used for transforming the geometry from the layer's CRS to the map crs. If \a layer is NULLPTR no coordinate transformation will occur.
* \param doUpdate set to FALSE to defer updates of the rubber band.
*/
void addGeometry( const QgsGeometry &geometry, QgsMapLayer *layer, bool doUpdate = true );
@@ -71,7 +71,7 @@ void TestQgsMapToolCapture::addVertexNonVectorLayer()

QgsAnnotationLayer *layer = new QgsAnnotationLayer( QStringLiteral( "test" ), QgsAnnotationLayer::LayerOptions( QgsProject::instance()->transformContext() ) );
QVERIFY( layer->isValid() );
QgsProject::instance()->addMapLayers( { layer} );
QgsProject::instance()->addMapLayers( { layer } );

canvas.setLayers( { layer } );
canvas.setCurrentLayer( layer );

0 comments on commit bd8a8d5

Please sign in to comment.