Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Scrap the toggleTextItemVisibilities feature
  • Loading branch information
YoannQDQ authored and nyalldawson committed May 7, 2023
1 parent d700108 commit 28af4c0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
18 changes: 0 additions & 18 deletions src/app/qgsmaptoolannotation.cpp
Expand Up @@ -147,11 +147,6 @@ void QgsMapToolAnnotation::canvasPressEvent( QgsMapMouseEvent *e )

void QgsMapToolAnnotation::keyPressEvent( QKeyEvent *e )
{
if ( e->key() == Qt::Key_T && e->modifiers() == Qt::ControlModifier )
{
toggleTextItemVisibilities();
}

QgsMapCanvasAnnotationItem *item = selectedItem();
if ( item )
{
Expand Down Expand Up @@ -378,19 +373,6 @@ QList<QgsMapCanvasAnnotationItem *> QgsMapToolAnnotation::annotationItems() cons
}
}

void QgsMapToolAnnotation::toggleTextItemVisibilities()
{
const QList<QgsMapCanvasAnnotationItem *> itemList = annotationItems();
const auto constItemList = itemList;
for ( QgsMapCanvasAnnotationItem *item : constItemList )
{
QgsTextAnnotation *textItem = qobject_cast<QgsTextAnnotation *>( item->annotation() );
if ( textItem )
{
textItem->setVisible( !textItem->isVisible() );
}
}
}

QgsPointXY QgsMapToolAnnotation::transformCanvasToAnnotation( QgsPointXY p, QgsAnnotation *annotation ) const
{
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsmaptoolannotation.h
Expand Up @@ -56,8 +56,6 @@ class APP_EXPORT QgsMapToolAnnotation: public QgsMapTool
QgsMapCanvasAnnotationItem *selectedItem() const;
//! Returns a list of all annotationitems in the canvas
QList<QgsMapCanvasAnnotationItem *> annotationItems() const;
//! Switches visibility states of text items
void toggleTextItemVisibilities();

QgsPointXY transformCanvasToAnnotation( QgsPointXY p, QgsAnnotation *annotation ) const;

Expand Down

0 comments on commit 28af4c0

Please sign in to comment.