From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Tue, 31 Oct 2006 13:10:21 +0000 (+0000)
Subject: checking that a wxWindow is of run-time type wxWindow is hopefully useless
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/35386afc20c513a7067ed5435e30e38edcd47601

checking that a wxWindow is of run-time type wxWindow is hopefully useless


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp
index 5ce46b41bd..b33ac93219 100644
--- a/src/xrc/xh_sizer.cpp
+++ b/src/xrc/xh_sizer.cpp
@@ -185,10 +185,8 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
 
     wxCHECK_MSG(m_parentSizer != NULL ||
                 (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
-                 m_parentAsWindow != NULL &&
-                 (m_parentAsWindow->IsKindOf(CLASSINFO(wxWindow)))
-                    ), NULL,
-                wxT("Incorrect use of sizer: parent is not a 'wxWindow'."));
+                 m_parentAsWindow), NULL,
+                wxT("Sizer must have a window parent node"));
 
     if (m_class == wxT("wxBoxSizer"))
         sizer = Handle_wxBoxSizer();