From: Dimitri Schoolwerth Date: Mon, 23 Aug 2004 22:27:11 +0000 (+0000) Subject: invalidate field-width cache when changing field count X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f9a961e1aefd34f581d2e3564ca29d7b20f9b082 invalidate field-width cache when changing field count git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index fea9c6ad98..831d2d8717 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -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?") ); }