Fix <object_ref> processing to respect overridden attributes.

r60494 accidentally broke this, by adding faster code path for
child-less <object_ref>s. Unfortunately, this made it ignore
<object_ref>s without children, but with attributes overrides.

Fixes #13061.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2011-03-22 19:13:28 +00:00
parent c560088c4d
commit 9445e542a0

View File

@@ -983,7 +983,10 @@ wxXmlResource::DoCreateResFromNode(wxXmlNode& node,
return NULL;
}
if ( !node.GetChildren() )
const bool hasOnlyRefAttr = node.GetAttributes() != NULL &&
node.GetAttributes()->GetNext() == NULL;
if ( hasOnlyRefAttr && !node.GetChildren() )
{
// In the typical, simple case, <object_ref> is used to link
// to another node and doesn't have any content of its own that