Skip to content

Commit

Permalink
Enable geometry restore for annotation config dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 8, 2017
1 parent 5473eba commit 14f754a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgsformannotationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
Expand Down Expand Up @@ -46,6 +47,8 @@ QgsFormAnnotationDialog::QgsFormAnnotationDialog( QgsMapCanvasAnnotationItem *it
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsFormAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );

QgsGui::instance()->enableAutoGeometryRestore( this );
}

void QgsFormAnnotationDialog::applySettingsToItem()
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgshtmlannotationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
Expand Down Expand Up @@ -47,6 +48,8 @@ QgsHtmlAnnotationDialog::QgsHtmlAnnotationDialog( QgsMapCanvasAnnotationItem *it
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsHtmlAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );

QgsGui::instance()->enableAutoGeometryRestore( this );
}

void QgsHtmlAnnotationDialog::applySettingsToItem()
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgssvgannotationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgsmapcanvasannotationitem.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
Expand Down Expand Up @@ -49,6 +50,8 @@ QgsSvgAnnotationDialog::QgsSvgAnnotationDialog( QgsMapCanvasAnnotationItem *item
QPushButton *deleteButton = new QPushButton( tr( "Delete" ) );
QObject::connect( deleteButton, &QPushButton::clicked, this, &QgsSvgAnnotationDialog::deleteItem );
mButtonBox->addButton( deleteButton, QDialogButtonBox::RejectRole );

QgsGui::instance()->enableAutoGeometryRestore( this );
}

void QgsSvgAnnotationDialog::mBrowseToolButton_clicked()
Expand Down
3 changes: 3 additions & 0 deletions src/app/qgstextannotationdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "qgsmapcanvasannotationitem.h"
#include "qgsannotationmanager.h"
#include "qgsproject.h"
#include "qgsgui.h"
#include <QColorDialog>
#include <QGraphicsScene>

Expand All @@ -44,6 +45,8 @@ QgsTextAnnotationDialog::QgsTextAnnotationDialog( QgsMapCanvasAnnotationItem *it
mTextEdit->setDocument( mTextDocument.get() );
}

QgsGui::instance()->enableAutoGeometryRestore( this );

mFontColorButton->setColorDialogTitle( tr( "Select Font Color" ) );
mFontColorButton->setAllowOpacity( true );
mFontColorButton->setContext( QStringLiteral( "symbology" ) );
Expand Down

0 comments on commit 14f754a

Please sign in to comment.