X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/44c44c82a3fe5362bac5cc9536f06eeac52af00c..60848fcfefa649f4e1275281639881452374a350:/src/generic/statusbr.cpp?ds=sidebyside diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index ce2b35cb4b..55eb58cc4f 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "statusbr.h" #endif @@ -133,12 +133,16 @@ void wxStatusBarGeneric::SetStatusText(const wxString& text, int number) wxCHECK_RET( (number >= 0) && (number < m_nFields), _T("invalid status bar field index") ); - m_statusStrings[number] = text; + wxString oldText = m_statusStrings[number]; + if (oldText != text) + { + m_statusStrings[number] = text; - wxRect rect; - GetFieldRect(number, rect); + wxRect rect; + GetFieldRect(number, rect); - Refresh( TRUE, &rect ); + Refresh( TRUE, &rect ); + } } wxString wxStatusBarGeneric::GetStatusText(int n) const