Skip to content
Permalink
Browse files

Enable geometry restore for annotation config dialogs

  • Loading branch information
nyalldawson committed Dec 8, 2017
1 parent 5473eba commit 14f754ac6a24810583eedc1113b1e31d0ba1a12c
@@ -19,6 +19,7 @@
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -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()
@@ -19,6 +19,7 @@
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -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()
@@ -21,6 +21,7 @@
#include "qgsmapcanvasannotationitem.h"
#include "qgsproject.h"
#include "qgsannotationmanager.h"
#include "qgsgui.h"
#include <QFileDialog>
#include <QFileInfo>
#include <QGraphicsScene>
@@ -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()
@@ -21,6 +21,7 @@
#include "qgsmapcanvasannotationitem.h"
#include "qgsannotationmanager.h"
#include "qgsproject.h"
#include "qgsgui.h"
#include <QColorDialog>
#include <QGraphicsScene>

@@ -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" ) );

0 comments on commit 14f754a

Please sign in to comment.
You can’t perform that action at this time.