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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user