X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0dc8fac22be12b6d174db7eca59a5a1b7415d673..c84d128369304dea6a3d79aec61b402ecb1982a5:/src/common/statbar.cpp diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index d9a9d24544..323ce920e0 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -42,7 +42,7 @@ const char wxStatusBarNameStr[] = "statusBar"; IMPLEMENT_DYNAMIC_CLASS(wxStatusBar, wxWindow) #include "wx/arrimpl.cpp" // This is a magic incantation which must be done! -WX_DEFINE_OBJARRAY(wxStatusBarPaneArray); +WX_DEFINE_OBJARRAY(wxStatusBarPaneArray) // ---------------------------------------------------------------------------- @@ -194,12 +194,15 @@ void wxStatusBarBase::PushStatusText(const wxString& text, int number) // save current status text in the stack m_panes[number].arrStack.push_back(GetStatusText(number)); - // update current status text SetStatusText(text, number); + // update current status text (eventually also in the native control) } void wxStatusBarBase::PopStatusText(int number) { + wxASSERT_MSG(m_panes[number].arrStack.GetCount() == 1, + "can't pop any further string"); + wxString text = m_panes[number].arrStack.back(); m_panes[number].arrStack.pop_back(); // also remove it from the stack