]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_stlin.cpp
added debugging code for redrawing
[wxWidgets.git] / src / xrc / xh_stlin.cpp
index 72955efbaee59b5bf1730ed6ca9ae98100af0c3e..5f9889a9295cc448aa8e0813e54016b62c989e12 100644 (file)
@@ -34,12 +34,17 @@ wxStaticLineXmlHandler::wxStaticLineXmlHandler()
 
 wxObject *wxStaticLineXmlHandler::DoCreateResource()
 { 
 
 wxObject *wxStaticLineXmlHandler::DoCreateResource()
 { 
-    wxStaticLine *line = new wxStaticLine(m_parentAsWindow,
-                                    GetID(),
-                                    GetPosition(), GetSize(),
-                                    GetStyle(wxT("style"), wxLI_HORIZONTAL),
-                                    GetName()
-                                    );
+    wxStaticLine *line = wxStaticCast(m_instance, wxStaticLine);
+
+    if (!line)
+       line = new wxStaticLine;
+
+    line->Create(m_parentAsWindow,
+                GetID(),
+                GetPosition(), GetSize(),
+                GetStyle(wxT("style"), wxLI_HORIZONTAL),
+                GetName());
+
     SetupWindow(line);
     
     return line;
     SetupWindow(line);
     
     return line;