Fix 1796068: when a valuenode changes, ValueNode::on_changed() will now signal all...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 17 Sep 2007 10:04:05 +0000 (10:04 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 17 Sep 2007 10:04:05 +0000 (10:04 +0000)
git-svn-id: http://svn.voria.com/code@685 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/valuenode.cpp

index cd7a7b5..5e23fc7 100644 (file)
@@ -235,9 +235,12 @@ ValueNode::~ValueNode()
 void
 ValueNode::on_changed()
 {
-       if(get_parent_canvas())
-               get_parent_canvas()->signal_value_node_changed()(this);
-       else if(get_root_canvas() && get_parent_canvas())
+       etl::loose_handle<Canvas> parent_canvas = get_parent_canvas();
+       if(parent_canvas)
+               do                                              // signal to all the ancestor canvases
+                       parent_canvas->signal_value_node_changed()(this);
+               while (parent_canvas = parent_canvas->parent());
+       else if(get_root_canvas())
                get_root_canvas()->signal_value_node_changed()(this);
 
        Node::on_changed();