Only select the first radio button if there is one in wxMSW wxRadioBox.
Don't call SetSelection(0) if the radio box is empty. See #16630. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -245,7 +245,9 @@ bool wxRadioBox::Create(wxWindow *parent,
|
||||
#endif
|
||||
|
||||
SetMajorDim(majorDim == 0 ? n : majorDim, style);
|
||||
SetSelection(0);
|
||||
// Select the first radio button if we have any buttons at all.
|
||||
if ( n > 0 )
|
||||
SetSelection(0);
|
||||
SetSize(pos.x, pos.y, size.x, size.y);
|
||||
|
||||
// Now that we have items determine what is the best size and set it.
|
||||
|
Reference in New Issue
Block a user