X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe161a2685012cf90bb5bfe95f2260aee71d8ad7..a76342da418c75ead546ce2025db24dad261d237:/src/gtk1/bmpbuttn.cpp?ds=sidebyside diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 8be33e83f7..34f5bab890 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -184,7 +184,6 @@ void wxBitmapButton::SetLabel( const wxString &label ) wxCHECK_RET( m_widget != NULL, wxT("invalid button") ); wxControl::SetLabel( label ); - PostSetLabel(); } wxString wxBitmapButton::GetLabel() const @@ -206,6 +205,8 @@ void wxBitmapButton::OnSetBitmap() { wxCHECK_RET( m_widget != NULL, wxT("invalid bitmap button") ); + InvalidateBestSize(); + wxBitmap the_one; if (!m_isEnabled) the_one = m_bmpDisabled; @@ -259,6 +260,7 @@ wxSize wxBitmapButton::DoGetBestSize() const best.x = m_bmpNormal.GetWidth()+border; best.y = m_bmpNormal.GetHeight()+border; } + CacheBestSize(best); return best; }