]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/statusbr.cpp
Committed William Osborne's wxPalmOS port
[wxWidgets.git] / src / generic / statusbr.cpp
index fea9c6ad980349d54f4849cacf6e568521cda2bd..b633fa4fa6fb147693832ac747e2811dad1cf34d 100644 (file)
@@ -68,7 +68,9 @@ wxStatusBarGeneric::~wxStatusBarGeneric()
 {
     // VZ: what is this for? please comment...
 #ifdef __WXMSW__
-    SetFont(wxNullFont);
+    // JACS: commenting out since it causes an assert
+    // and there seems no reason for it.
+    // SetFont(wxNullFont);
 #endif // MSW
 }
 
@@ -86,8 +88,12 @@ bool wxStatusBarGeneric::Create(wxWindow *parent,
   SetThemeEnabled( true );
 
   // Don't wish this to be found as a child
+  // JACS: this is not true for the Windows native version,
+  // so why should it be true here? This control can be used
+  // as a child of an arbitrary window, not just for frames.
+  // Commenting out.
 #ifndef __WXMAC__
-  parent->GetChildren().DeleteObject(this);
+  // parent->GetChildren().DeleteObject(this);
 #endif
   InitColours();
   
@@ -140,6 +146,9 @@ void wxStatusBarGeneric::SetFieldsCount(int number, const int *widths)
     for (i = m_nFields - 1; i >= number; --i)
         m_statusStrings.RemoveAt(i);
 
+    // forget the old cached pixel widths
+    m_widthsAbs.Empty();
+
     wxStatusBarBase::SetFieldsCount(number, widths);
 
     wxASSERT_MSG( m_nFields == (int)m_statusStrings.GetCount(),