]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_sizer.cpp
Don't set insertion point if the text is the same in SetValue
[wxWidgets.git] / src / xrc / xh_sizer.cpp
index 2a1bbf8eb95d10465a2029cefb4ad5181905270f..eaeec961c29237c780a498936d1e5ba01eb35f2b 100644 (file)
@@ -27,6 +27,8 @@
 #include "wx/panel.h"
 #include "wx/tokenzr.h"
 
+IMPLEMENT_DYNAMIC_CLASS(wxSizerXmlHandler, wxXmlResourceHandler)
+
 bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node)
 {
     return (IsOfClass(node, wxT("wxBoxSizer"))) ||
@@ -140,6 +142,7 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
 
         wxCHECK_MSG(m_parentSizer != NULL ||
                 (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+                    m_parentAsWindow != NULL &&
                     (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
                      m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
                      m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog)))