]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_combo.cpp
update frm Ivan Masar
[wxWidgets.git] / src / xrc / xh_combo.cpp
index 99c037055926eb8a44a5e64a45b0808eeca8ad70..da2040909cec70fbac60bb884330bc1e95203f0f 100644 (file)
@@ -47,14 +47,6 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
         // need to build the list of strings from children
         m_insideBox = true;
         CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
-        wxString *strings = (wxString *) NULL;
-        if (strList.GetCount() > 0)
-        {
-            strings = new wxString[strList.GetCount()];
-            int count = strList.GetCount();
-            for (int i = 0; i < count; i++)
-                strings[i]=strList[i];
-        }
 
         XRC_MAKE_INSTANCE(control, wxComboBox)
 
@@ -62,8 +54,7 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
                         GetID(),
                         GetText(wxT("value")),
                         GetPosition(), GetSize(),
-                        strList.GetCount(),
-                        strings,
+                        strList,
                         GetStyle(),
                         wxDefaultValidator,
                         GetName());
@@ -73,8 +64,6 @@ wxObject *wxComboBoxXmlHandler::DoCreateResource()
 
         SetupWindow(control);
 
-        if (strings != NULL)
-            delete[] strings;
         strList.Clear();    // dump the strings
 
         return control;