X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_dynamiclist.cpp;h=a86403f417edb66e1f69df36f8b392ecc226ebcf;hb=e9904990d49499270dfe26a9ae85178a456b30aa;hp=a93a752560368ae6362c3dbaae25757c8d9b0478;hpb=5ddcf36f04cfbd10fabda4e3c5633cb27cdd4c0a;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp index a93a752..a86403f 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp @@ -2,7 +2,7 @@ /*! \file valuenode_dynamiclist.cpp ** \brief Template File ** -** $Id: valuenode_dynamiclist.cpp,v 1.1.1.1 2005/01/04 01:23:15 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley @@ -525,9 +525,17 @@ ValueNode_DynamicList::erase(const ValueNode::Handle &value_node_) if(value_node) { remove_child(value_node.get()); - if(get_parent_canvas()) - get_parent_canvas()->signal_value_node_child_removed()(this,value_node); - else if(get_root_canvas() && get_parent_canvas()) + // changed to fix bug 1420091 - it seems that when a .sif file containing a bline layer encapsulated inside + // another layer, get_parent_canvas() is false and get_root_canvas() is true, but when we come to erase a + // vertex, both are true. So the signal is sent to the parent, but the signal wasn't sent to the parent + // when it was added. This probably isn't the right fix, but it seems to work for now. Note that the same + // strange "if (X) else if (Y && X)" code is also present in the two previous functions, above. + + // if(get_parent_canvas()) + // get_parent_canvas()->signal_value_node_child_removed()(this,value_node); + // else if(get_root_canvas() && get_parent_canvas()) + // get_root_canvas()->signal_value_node_child_removed()(this,value_node); + if(get_root_canvas()) get_root_canvas()->signal_value_node_child_removed()(this,value_node); } break;