From: dooglus Date: Mon, 17 Sep 2007 10:04:05 +0000 (+0000) Subject: Fix 1796068: when a valuenode changes, ValueNode::on_changed() will now signal all... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5e6e1696d7912d0b93b476617525aeafbde756ab;p=synfig.git Fix 1796068: when a valuenode changes, ValueNode::on_changed() will now signal all its parent canvases. git-svn-id: http://svn.voria.com/code@685 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp index cd7a7b5..5e23fc7 100644 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ b/synfig-core/trunk/src/synfig/valuenode.cpp @@ -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 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();