make sure the first item of a radio group is checked by default
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77794 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1127,6 +1127,8 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
|
||||
// for now it has just one element
|
||||
item->SetAsRadioGroupStart();
|
||||
item->SetRadioGroupEnd(m_startRadioGroup);
|
||||
wxMenuBase::DoAppend(item);
|
||||
item->Check(true);
|
||||
}
|
||||
else // extend the current radio group
|
||||
{
|
||||
@@ -1142,16 +1144,15 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
|
||||
{
|
||||
wxFAIL_MSG( wxT("where is the radio group start item?") );
|
||||
}
|
||||
wxMenuBase::DoAppend(item);
|
||||
}
|
||||
}
|
||||
else // not a radio item
|
||||
{
|
||||
EndRadioGroup();
|
||||
wxMenuBase::DoAppend(item);
|
||||
}
|
||||
|
||||
if ( !wxMenuBase::DoAppend(item) )
|
||||
return NULL;
|
||||
|
||||
OnItemAdded(item);
|
||||
|
||||
return item;
|
||||
|
Reference in New Issue
Block a user