From 98c3bd9c080667ee1bf46e69e625678983a52c47 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 19 Nov 2008 13:44:24 +0000 Subject: [PATCH] Add a new signal_subcanvas_changed() that is signalled whenever a PasteCanvas' subcanvas is changed. Not used yet. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2221 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/layer_pastecanvas.cpp | 2 ++ synfig-core/trunk/src/synfig/layer_pastecanvas.h | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp index bcf954f..f8006e4 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp @@ -212,6 +212,8 @@ Layer_PasteCanvas::set_sub_canvas(etl::handle x) child_changed_connection.disconnect(); + if (canvas != x) signal_subcanvas_changed()(); + canvas=x; /*if(canvas) diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.h b/synfig-core/trunk/src/synfig/layer_pastecanvas.h index 3a3811e..ab1bd1f 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.h +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.h @@ -97,6 +97,23 @@ private: // did, but we've forgotten whether we did. So we use this // 'extra_reference' member to store that decision. bool extra_reference; + + /* + -- ** -- S I G N A L S ------------------------------------------------------- + */ + +private: + + sigc::signal signal_subcanvas_changed_; + + /* + -- ** -- S I G N A L I N T E R F A C E ------------------------------------- + */ + +public: + + sigc::signal& signal_subcanvas_changed() { return signal_subcanvas_changed_; } + public: void update_renddesc(); -- 2.7.4