Add a new signal_subcanvas_changed() that is signalled whenever a PasteCanvas' subcan...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 19 Nov 2008 13:44:24 +0000 (13:44 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 19 Nov 2008 13:44:24 +0000 (13:44 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2221 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/layer_pastecanvas.cpp
synfig-core/trunk/src/synfig/layer_pastecanvas.h

index bcf954f..f8006e4 100644 (file)
@@ -212,6 +212,8 @@ Layer_PasteCanvas::set_sub_canvas(etl::handle<synfig::Canvas> x)
 
        child_changed_connection.disconnect();
 
+       if (canvas != x) signal_subcanvas_changed()();
+
        canvas=x;
 
        /*if(canvas)
index 3a3811e..ab1bd1f 100644 (file)
@@ -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<void> signal_subcanvas_changed_;
+
+       /*
+ -- ** -- S I G N A L   I N T E R F A C E -------------------------------------
+       */
+
+public:
+
+       sigc::signal<void>& signal_subcanvas_changed() { return signal_subcanvas_changed_; }
+
 public:
 
        void update_renddesc();