diff --git a/mythtv/libs/libmythui/mythuitype.cpp b/mythtv/libs/libmythui/mythuitype.cpp
index 5341e4b..ecc0739 100644
--- a/mythtv/libs/libmythui/mythuitype.cpp
+++ b/mythtv/libs/libmythui/mythuitype.cpp
@@ -1406,4 +1406,4 @@ void MythUIType::ConnectDependants(bool recurse)
                 (*it)->ConnectDependants(recurse);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/mythtv/libs/libmythui/mythuitype.h b/mythtv/libs/libmythui/mythuitype.h
index c39630e..e6c6a81 100644
--- a/mythtv/libs/libmythui/mythuitype.h
+++ b/mythtv/libs/libmythui/mythuitype.h
@@ -71,6 +71,10 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
 
     virtual void Reset(void);
 
+    // Only use for theme debugging
+    const QString &GetXMLName() const{ return m_xmlName;};
+    void SetXMLName(QString xmlName){ m_xmlName = xmlName;};
+
     void AddChild(MythUIType *child);
     MythUIType *GetChild(const QString &name) const;
     MythUIType *GetChildAt(const QPoint &p, bool recursive=true,
@@ -218,6 +222,7 @@ class MUI_PUBLIC MythUIType : public QObject, public XMLParseBase
     virtual void CreateCopy(MythUIType *parent);
     virtual void Finalize(void);
 
+    QString m_xmlName;
     QList<MythUIType *> m_ChildrenList;
     QMap<QString, QString> m_dependsMap;
 
diff --git a/mythtv/libs/libmythui/mythuiutils.h b/mythtv/libs/libmythui/mythuiutils.h
index 01f2190..eb6d079 100644
--- a/mythtv/libs/libmythui/mythuiutils.h
+++ b/mythtv/libs/libmythui/mythuiutils.h
@@ -4,6 +4,7 @@
 #include <cstdlib>
 
 #include "mythuiexp.h"
+#include "mythuitype.h"
 
 class QString;
 
@@ -22,8 +23,8 @@ struct MUI_PUBLIC ETPrintError
 template <typename ErrorDispatch = ETPrintWarning>
 struct UIUtilDisp
 {
-    template <typename ContainerType, typename UIType>
-    static bool Assign(ContainerType *container, UIType *&item,
+    template <typename MythUIType, typename UIType>
+    static bool Assign(MythUIType *container, UIType *&item,
                        const QString &name, bool *err = NULL)
     {
         if (!container)
@@ -41,9 +42,9 @@ struct UIUtilDisp
             return false;
 
         if (err)
-            *err |= ErrorDispatch::Child(container->objectName(), name);
+            *err |= ErrorDispatch::Child(container->GetXMLName(), name);
         else
-            ErrorDispatch::Child(container->objectName(), name);
+            ErrorDispatch::Child(container->GetXMLName(), name);
         return true;
     }
 };
diff --git a/mythtv/libs/libmythui/xmlparsebase.cpp b/mythtv/libs/libmythui/xmlparsebase.cpp
index 6322111..4abcbd3 100644
--- a/mythtv/libs/libmythui/xmlparsebase.cpp
+++ b/mythtv/libs/libmythui/xmlparsebase.cpp
@@ -685,6 +685,7 @@ bool XMLParseBase::LoadWindowFromXML(const QString &xmlfile,
         if (doLoad(windowname, parent, themefile,
                    onlyLoadWindows, showWarnings))
         {
+            parent->SetXMLName(windowname);
             return true;
         }
         else
@@ -923,5 +924,6 @@ bool XMLParseBase::CopyWindowFromBase(const QString &windowname,
     }
 
     win->CopyFrom(st);
+    win->SetXMLName(windowname);
     return true;
 }
