]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_statbar.cpp
added wxXRC_NO_RELOADING
[wxWidgets.git] / contrib / src / xrc / xh_statbar.cpp
index a31db982a4229414e86798eddce32db3f4c05031..a5e04452efcf9e60f89b120914d44b58f740c0df 100644 (file)
@@ -48,7 +48,7 @@ wxObject *wxStatusBarXmlHandler::DoCreateResource()
     int fields = GetLong(wxT("fields"), 1);
     wxString widths = GetParamValue(wxT("widths"));
 
     int fields = GetLong(wxT("fields"), 1);
     wxString widths = GetParamValue(wxT("widths"));
 
-    if(fields > 1)
+    if (fields > 1 && !widths.IsEmpty())
     {
         int *width = new int[fields];
 
     {
         int *width = new int[fields];
 
@@ -61,6 +61,8 @@ wxObject *wxStatusBarXmlHandler::DoCreateResource()
         statbar->SetFieldsCount(fields, width);
         delete[] width;
     }
         statbar->SetFieldsCount(fields, width);
         delete[] width;
     }
+    else
+        statbar->SetFieldsCount(fields);
 
     if (m_parentAsWindow)
     {
 
     if (m_parentAsWindow)
     {