From: Vadim Zeitlin Date: Tue, 14 Jan 2003 23:47:12 +0000 (+0000) Subject: fixed wxStaticText best size calculation (closes bug 667324) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a629e51df9e8034ac3a0f9c2c871cbfafd1632a?ds=inline fixed wxStaticText best size calculation (closes bug 667324) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index d91188d161..a69ab38840 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -70,6 +70,7 @@ wxMSW: - wxCheckListBox::Check() doesn't send CHECKLISTBOX_TOGGLE event any more - fixed bug with wxTR_EDIT_LABELS not workign with wxTR_MULTIPLE - fixes for compilation with OpenWatcom compiler +- fixed wxStaticText best size calculation (was wrong by '&' width) OLD CHANGES =========== diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 6a2056e2af..14c62eca20 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -106,7 +106,10 @@ wxSize wxStaticText::DoGetBestSize() const } } else { - curLine += *pc; + // we shouldn't take into account the '&' which just introduce the + // mnemonic characters and so are not shown on the screen + if ( pc != _T('&') ) + curLine += *pc; } }