aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/guilib/GUIIncludes.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/xbmc/guilib/GUIIncludes.cpp b/xbmc/guilib/GUIIncludes.cpp
index 0bab17917c..e066df5b67 100644
--- a/xbmc/guilib/GUIIncludes.cpp
+++ b/xbmc/guilib/GUIIncludes.cpp
@@ -208,12 +208,23 @@ void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool
map<CStdString, TiXmlElement>::const_iterator it = m_defaults.find(type);
if (it != m_defaults.end())
{
+ // we don't insert <left> et. al. if <posx> or <posy> is specified
+ bool hasPosX(node->FirstChild("posx") != NULL);
+ bool hasPosY(node->FirstChild("posy") != NULL);
+
const TiXmlElement &element = (*it).second;
const TiXmlElement *tag = element.FirstChildElement();
while (tag)
{
+ std::string value = tag->ValueStr();
+ bool skip(false);
+ if (hasPosX && (value == "left" || value == "right" || value == "centerx"))
+ skip = true;
+ if (hasPosY && (value == "top" || value == "bottom" || value == "centery"))
+ skip = true;
// we insert at the end of block
- node->InsertEndChild(*tag);
+ if (!skip)
+ node->InsertEndChild(*tag);
tag = tag->NextSiblingElement();
}
}