]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobut.cpp
WinCE fixes (in case a WinCE-friendly backend gets written one day)
[wxWidgets.git] / src / msw / radiobut.cpp
index e88d6d7829b0dd21ea24c0dd930611c7f812909c..42bbdc43e558bbcaa6cced7eeb8ca2fa4f6b52fa 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "radiobut.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -300,7 +296,7 @@ wxSize wxRadioButton::DoGetBestSize() const
     int wRadio, hRadio;
     if ( !str.empty() )
     {
-        GetTextExtent(str, &wRadio, &hRadio);
+        GetTextExtent(wxStripMenuCodes(str), &wRadio, &hRadio);
         wRadio += s_radioSize + GetCharWidth();
 
         if ( hRadio < s_radioSize )
@@ -312,7 +308,9 @@ wxSize wxRadioButton::DoGetBestSize() const
         hRadio = s_radioSize;
     }
 
-    return wxSize(wRadio, hRadio);
+    wxSize best(wRadio, hRadio);
+    CacheBestSize(best);
+    return best;
 }
 
 #endif // wxUSE_RADIOBTN