]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_chckb.cpp
Applied patch [ 607261 ] Fix: wxGrid: row and cell selection
[wxWidgets.git] / src / xrc / xh_chckb.cpp
index 493c876f5c596807a256d1492634b904c7a3c216..35086f42b3718f1a78c2a9f8ce8ad13ed580d64f 100644 (file)
@@ -32,10 +32,7 @@ wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
 
 wxObject *wxCheckBoxXmlHandler::DoCreateResource()
 { 
-    wxCheckBox *control = wxStaticCast(m_instance, wxCheckBox);
-
-    if (!control)
-       control = new wxCheckBox;
+    XRC_MAKE_INSTANCE(control, wxCheckBox)
 
     control->Create(m_parentAsWindow,
                     GetID(),
@@ -45,14 +42,12 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource()
                     wxDefaultValidator,
                     GetName());
 
-    control->SetValue( GetBool( wxT("checked")));
+    control->SetValue(GetBool( wxT("checked")));
     SetupWindow(control);
     
     return control;
 }
 
-
-
 bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxCheckBox"));