Inserted an else that seemed to be missing. (My RadioBox crashed

without it...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 1998-07-16 06:47:27 +00:00
parent e49f47aa77
commit 1eb20d4a08

View File

@ -116,7 +116,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
m_noRowsOrCols = majorDim; m_noRowsOrCols = majorDim;
if (majorDim==0) if (majorDim==0)
m_majorDim = n ; m_majorDim = n ;
m_majorDim = majorDim ; else // Seemed to make sense to put this 'else' here... (RD)
m_majorDim = majorDim ;
long msStyle = GROUP_FLAGS; long msStyle = GROUP_FLAGS;
@ -321,7 +322,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
wxRadioBox::~wxRadioBox(void) wxRadioBox::~wxRadioBox(void)
{ {
m_isBeingDeleted = TRUE; m_isBeingDeleted = TRUE;
if (m_radioButtons) if (m_radioButtons)
{ {
int i; int i;
@ -642,7 +643,7 @@ void wxRadioBox::Enable(int item, bool enable)
void wxRadioBox::Enable(bool enable) void wxRadioBox::Enable(bool enable)
{ {
wxControl::Enable(enable); wxControl::Enable(enable);
int i; int i;
for (i = 0; i < m_noItems; i++) for (i = 0; i < m_noItems; i++)
::EnableWindow((HWND) m_radioButtons[i], enable); ::EnableWindow((HWND) m_radioButtons[i], enable);
@ -733,7 +734,7 @@ void wxRadioBox::SetLabelFont(wxFont *font)
if (font) if (font)
{ {
font->RealizeResource(); font->RealizeResource();
if (font->GetResourceHandle()) if (font->GetResourceHandle())
SendMessage(hWnd, WM_SETFONT, SendMessage(hWnd, WM_SETFONT,
(WPARAM)font->GetResourceHandle(),TRUE); (WPARAM)font->GetResourceHandle(),TRUE);