Skip to content
Permalink
Browse files
Newly created text annotations should default to default text format
  • Loading branch information
nyalldawson committed Sep 8, 2021
1 parent 24089aa commit 218d6e74155860871f3736e3c28d39033a86b7cd
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp
@@ -17,6 +17,7 @@
#include "qgsmapmouseevent.h"
#include "qgsannotationpointtextitem.h"
#include "qgsannotationlayer.h"
#include "qgsstyle.h"

///@cond PRIVATE

@@ -37,6 +38,7 @@ void QgsCreatePointTextItemMapTool::cadCanvasPressEvent( QgsMapMouseEvent *event

mCreatedItem = std::make_unique< QgsAnnotationPointTextItem >( tr( "Text" ), layerPoint );
mCreatedItem->setAlignment( Qt::AlignLeft );
mCreatedItem->setFormat( QgsStyle::defaultStyle()->defaultTextFormat( QgsStyle::TextFormatContext::Labeling ) );
emit itemCreated();
}

0 comments on commit 218d6e7

Please sign in to comment.