Skip to content

Commit

Permalink
Correctly add newly created annotations to manager
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 30, 2017
1 parent ad184cd commit 5584c53
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/qgsmaptoolannotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent* e )
e->posF().y() / mCanvas->height() ) );
annotation->setFrameSize( QSizeF( 200, 100 ) );

QgsMapCanvasAnnotationItem* canvasItem = new QgsMapCanvasAnnotationItem( annotation, mCanvas );
canvasItem->setSelected( true );
QgsProject::instance()->setDirty( true );
QgsProject::instance()->annotationManager()->addAnnotation( annotation );
}
}
}
Expand Down

0 comments on commit 5584c53

Please sign in to comment.