summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ganv/Canvas.hpp2
-rw-r--r--src/Canvas.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/ganv/Canvas.hpp b/ganv/Canvas.hpp
index 886102b..7d12286 100644
--- a/ganv/Canvas.hpp
+++ b/ganv/Canvas.hpp
@@ -128,6 +128,8 @@ private:
inline GanvCanvasImpl* impl() { return _gobj->impl; }
inline const GanvCanvasImpl* impl() const { return _gobj->impl; }
+ sigc::connection _animate_connection;
+
GanvCanvas* const _gobj;
};
diff --git a/src/Canvas.cpp b/src/Canvas.cpp
index 057b841..7674813 100644
--- a/src/Canvas.cpp
+++ b/src/Canvas.cpp
@@ -1485,12 +1485,13 @@ Canvas::Canvas(double width, double height)
g_signal_connect(gobj(), "disconnect",
G_CALLBACK(on_disconnect), this);
- Glib::signal_timeout().connect(
+ _animate_connection = Glib::signal_timeout().connect(
sigc::mem_fun(impl(), &GanvCanvasImpl::animate_selected), 120);
}
Canvas::~Canvas()
{
+ _animate_connection.disconnect();
destroy();
delete impl();
}