From: Václav Slavík Date: Tue, 22 Mar 2011 19:13:28 +0000 (+0000) Subject: Fix processing to respect overridden attributes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9445e542a0f2c65cda2c640fd46b42fbdeac9ca1 Fix processing to respect overridden attributes. r60494 accidentally broke this, by adding faster code path for child-less s. Unfortunately, this made it ignore 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 --- diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 1b62dbc3dc..96650224bb 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -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, is used to link // to another node and doesn't have any content of its own that