Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/QmlControls/QGCMapPolygon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "KMLDomDocument.h"

#include <QtCore/QLineF>
#include <QMetaMethod>

QGCMapPolygon::QGCMapPolygon(QObject* parent)
: QObject (parent)
Expand All @@ -41,6 +42,11 @@ QGCMapPolygon::QGCMapPolygon(const QGCMapPolygon& other, QObject* parent)
_init();
}

QGCMapPolygon::~QGCMapPolygon()
{
qgcApp()->removeCompressedSignal(QMetaMethod::fromSignal(&QGCMapPolygon::pathChanged));
}

void QGCMapPolygon::_init(void)
{
connect(&_polygonModel, &QmlObjectListModel::dirtyChanged, this, &QGCMapPolygon::_polygonModelDirtyChanged);
Expand All @@ -49,6 +55,8 @@ void QGCMapPolygon::_init(void)
connect(this, &QGCMapPolygon::pathChanged, this, &QGCMapPolygon::_updateCenter);
connect(this, &QGCMapPolygon::countChanged, this, &QGCMapPolygon::isValidChanged);
connect(this, &QGCMapPolygon::countChanged, this, &QGCMapPolygon::isEmptyChanged);

qgcApp()->addCompressedSignal(QMetaMethod::fromSignal(&QGCMapPolygon::pathChanged));
}

const QGCMapPolygon& QGCMapPolygon::operator=(const QGCMapPolygon& other)
Expand Down
2 changes: 2 additions & 0 deletions src/QmlControls/QGCMapPolygon.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class QGCMapPolygon : public QObject
QGCMapPolygon(QObject* parent = nullptr);
QGCMapPolygon(const QGCMapPolygon& other, QObject* parent = nullptr);

~QGCMapPolygon() override;

const QGCMapPolygon& operator=(const QGCMapPolygon& other);

Q_PROPERTY(int count READ count NOTIFY countChanged)
Expand Down
8 changes: 8 additions & 0 deletions src/QmlControls/QGCMapPolyline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "QGCLoggingCategory.h"

#include <QtCore/QLineF>
#include <QMetaMethod>

QGCMapPolyline::QGCMapPolyline(QObject* parent)
: QObject (parent)
Expand All @@ -37,6 +38,11 @@ QGCMapPolyline::QGCMapPolyline(const QGCMapPolyline& other, QObject* parent)
_init();
}

QGCMapPolyline::~QGCMapPolyline()
{
qgcApp()->removeCompressedSignal(QMetaMethod::fromSignal(&QGCMapPolyline::pathChanged));
}

const QGCMapPolyline& QGCMapPolyline::operator=(const QGCMapPolyline& other)
{
clear();
Expand All @@ -58,6 +64,8 @@ void QGCMapPolyline::_init(void)

connect(this, &QGCMapPolyline::countChanged, this, &QGCMapPolyline::isValidChanged);
connect(this, &QGCMapPolyline::countChanged, this, &QGCMapPolyline::isEmptyChanged);

qgcApp()->addCompressedSignal(QMetaMethod::fromSignal(&QGCMapPolyline::pathChanged));
}

void QGCMapPolyline::clear(void)
Expand Down
2 changes: 2 additions & 0 deletions src/QmlControls/QGCMapPolyline.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class QGCMapPolyline : public QObject
QGCMapPolyline(QObject* parent = nullptr);
QGCMapPolyline(const QGCMapPolyline& other, QObject* parent = nullptr);

~QGCMapPolyline() override;

const QGCMapPolyline& operator=(const QGCMapPolyline& other);

Q_PROPERTY(int count READ count NOTIFY countChanged)
Expand Down
Loading