X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e40298d54ecd5b109222a7c60aa2ef084a304d69..505f0a85c9b59d8be30f2be1f7cf4fd3d663f721:/src/mac/radiobox.cpp?ds=sidebyside diff --git a/src/mac/radiobox.cpp b/src/mac/radiobox.cpp index 15ac067af7..f7874dd099 100644 --- a/src/mac/radiobox.cpp +++ b/src/mac/radiobox.cpp @@ -77,6 +77,8 @@ wxRadioBox::wxRadioBox() wxRadioBox::~wxRadioBox() { + m_isBeingDeleted = TRUE; + wxRadioButton *next,*current; current=m_radioButtonCycle->NextInCycle(); @@ -203,7 +205,7 @@ wxString wxRadioBox::GetString(int item) const wxRadioButton *current; if ((item < 0) || (item >= m_noItems)) - return wxString(""); + return wxEmptyString; i = 0; current = m_radioButtonCycle; @@ -379,7 +381,7 @@ void wxRadioBox::SetFocus() //------------------------------------------------------------------------------------- // Simulates the effect of the user issuing a command to the item -#define RADIO_SIZE 40 +#define RADIO_SIZE 20 void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) { @@ -409,7 +411,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) int totWidth,totHeight; SetFont(GetParent()->GetFont()); - GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight); + GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight); charWidth/=52; maxWidth=-1; @@ -423,7 +425,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) if (maxHeightGetFont(); - GetTextExtent(wxString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), + GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight, NULL, NULL, &font); charWidth /= 52; @@ -506,7 +508,7 @@ wxSize wxRadioBox::DoGetBestSize() const if (maxHeight < eachHeight) maxHeight = eachHeight; } - totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight * 3/2; + totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight ; totWidth = GetColumnCount() * (maxWidth + charWidth) + charWidth; // handle radio box title as well