- node = parent->GetChildren().Member(insertBefore);
-
- if (node)
- parent->GetChildren().Insert(node, this);
+ {
+ wxObjectList::compatibility_iterator node = parent->GetChildren().Member(insertBefore);
+ if (node)
+ parent->GetChildren().Insert(node, this);
+ else
+ parent->GetChildren().Append(this);
+ }