diff options
-rw-r--r-- | spline-widget/spline-widget.cpp | 6 | ||||
-rw-r--r-- | spline-widget/spline-widget.hpp | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/spline-widget/spline-widget.cpp b/spline-widget/spline-widget.cpp index 54107bbe..6e3a95b3 100644 --- a/spline-widget/spline-widget.cpp +++ b/spline-widget/spline-widget.cpp @@ -29,6 +29,12 @@ spline_widget::spline_widget(QWidget *parent) : setMouseTracking(true); } +spline_widget::~spline_widget() +{ + if (connection) + QObject::disconnect(connection); +} + void spline_widget::setConfig(spline* spl) { if (spl != _config) diff --git a/spline-widget/spline-widget.hpp b/spline-widget/spline-widget.hpp index 5fc50504..80397ac7 100644 --- a/spline-widget/spline-widget.hpp +++ b/spline-widget/spline-widget.hpp @@ -31,6 +31,7 @@ class OPENTRACK_SPLINE_EXPORT spline_widget final : public QWidget using points_t = spline::points_t; public: spline_widget(QWidget *parent = 0); + ~spline_widget(); spline* config(); |