Skip to content
Permalink
Browse files
[annotations][feature] Add a "modify annotation" action to annotations
toolbar

This tool can currently be used to:

- Click on an existing annotation to select it, which shows its
  properties (e.g. symbol, reference scale, z index, etc) in the
  layer styling dock
- Left click on a selected annotation item to start moving it. A
  right click or escape cancels the move, while a second left click
  will confirm the move.
- Pressing the delete key while an annotation is selected will delete
  that annotation
  • Loading branch information
nyalldawson committed Sep 7, 2021
1 parent ca729cc commit 476956ebaa46d17ceb21f2c08e0e0b22a6fc4aec
Showing with 17 additions and 0 deletions.
  1. +1 −0 src/app/qgisapp.cpp
  2. +16 −0 src/ui/qgisapp.ui
@@ -4403,6 +4403,7 @@ void QgisApp::setupCanvasTools()
mMapTools->mapTool( QgsAppMapTools::MoveLabel )->setAction( mActionMoveLabel );
mMapTools->mapTool( QgsAppMapTools::RotateLabel )->setAction( mActionRotateLabel );
mMapTools->mapTool( QgsAppMapTools::ChangeLabelProperties )->setAction( mActionChangeLabelProperties );
mMapTools->mapTool( QgsAppMapTools::AnnotationEdit )->setAction( mActionModifyAnnotation );

//ensure that non edit tool is initialized or we will get crashes in some situations
mNonEditMapTool = mMapTools->mapTool( QgsAppMapTools::Pan );
@@ -802,6 +802,7 @@
<bool>false</bool>
</attribute>
<addaction name="mActionCreateAnnotationLayer"/>
<addaction name="mActionModifyAnnotation"/>
</widget>
<action name="mActionNewProject">
<property name="icon">
@@ -3594,6 +3595,21 @@ Shows placeholders for labels which could not be placed, e.g. due to overlaps wi
<string>New Annotation Layer</string>
</property>
</action>
<action name="mActionModifyAnnotation">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSelect.svg</normaloff>:/images/themes/default/mActionSelect.svg</iconset>
</property>
<property name="text">
<string>Modify Annotations</string>
</property>
<property name="toolTip">
<string>Modify Annotations</string>
</property>
</action>
</widget>
<resources>
<include location="../../images/images.qrc"/>

0 comments on commit 476956e

Please sign in to comment.