Melchior FRANZ:

- check for isTied() and refcount has to be made *before* we go into
  recursion, so as to pertain subtrees of refcounted nodes, even if there
  are no refcounted/tied nodes *in* this tree
- return value inverted, because it's more logical to say
  removeChildren() == true --> everything removed;  false --> failed
- further cleanup
This commit is contained in:
ehofman
2005-06-29 09:41:07 +00:00
parent 81546820ab
commit fdd9bb1af6
2 changed files with 21 additions and 27 deletions
+5 -3
View File
@@ -714,14 +714,16 @@ public:
/**
* Remove a child node. Returns "true" if at least one node had to remain,
* because it was tied, aliased, or refcounted through SGPropertyNode_ptr.
* Remove a child node. Returns "true" if the node and all subnodes could
* be removed, and "false" if at least one node had to remain, because it
* was tied, aliased, or refcounted through SGPropertyNode_ptr.
*/
bool removeChild (const char * name, int index = 0);
/**
* Remove all children nodes, or all with a given name.
* Remove all children nodes, or all with a given name. True if all nodes
* were removed.
*/
bool removeChildren(const char * name = 0);