]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/statusbr.cpp
invalidate field-width cache when changing field count
[wxWidgets.git] / src / generic / statusbr.cpp
index fea9c6ad980349d54f4849cacf6e568521cda2bd..831d2d8717e73454eccb8cd5ab742341b9f31f5a 100644 (file)
@@ -142,6 +142,9 @@ void wxStatusBarGeneric::SetFieldsCount(int number, const int *widths)
 
     wxStatusBarBase::SetFieldsCount(number, widths);
 
+    // forget the old cached pixel widths
+    m_widthsAbs.Empty();
+
     wxASSERT_MSG( m_nFields == (int)m_statusStrings.GetCount(),
                   _T("This really should never happen, can we do away with m_nFields here?") );
 }