We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad184cd commit 5584c53Copy full SHA for 5584c53
src/app/qgsmaptoolannotation.cpp
@@ -127,9 +127,7 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent* e )
127
e->posF().y() / mCanvas->height() ) );
128
annotation->setFrameSize( QSizeF( 200, 100 ) );
129
130
- QgsMapCanvasAnnotationItem* canvasItem = new QgsMapCanvasAnnotationItem( annotation, mCanvas );
131
- canvasItem->setSelected( true );
132
- QgsProject::instance()->setDirty( true );
+ QgsProject::instance()->annotationManager()->addAnnotation( annotation );
133
}
134
135
0 commit comments