Skip to content

Commit

Permalink
Newly created text annotations should default to default text format
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 8, 2021
1 parent 24089aa commit 218d6e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp
Expand Up @@ -17,6 +17,7 @@
#include "qgsmapmouseevent.h"
#include "qgsannotationpointtextitem.h"
#include "qgsannotationlayer.h"
#include "qgsstyle.h"

///@cond PRIVATE

Expand All @@ -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();
}

Expand Down

0 comments on commit 218d6e7

Please sign in to comment.