(there may be intervening controls). Without this fix, an out-of-sync
assert is generated when clicking on a radio button and then calling
GetValue().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29971
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxMSW:
- fixed enhanced metafiles loading from files (Andreas Goebel)
wxMSW:
- fixed enhanced metafiles loading from files (Andreas Goebel)
+- Group of wxRadioButtons no longer have to be consecutive
{
wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
wxRadioButton);
{
wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
wxRadioButton);
+ if ( btn && btn->HasFlag(wxRB_SINGLE) )
- // the radio buttons in a group must be consecutive, so
- // there are no more of them
+ // A wxRB_SINGLE button isn't part of this group
-
- btn->SetValue(false);
-
- if ( btn->HasFlag(wxRB_GROUP) )
- // even if there are other radio buttons before this one,
- // they're not in the same group with us
- break;
+ btn->SetValue(false);
+
+ if ( btn->HasFlag(wxRB_GROUP) )
+ {
+ // even if there are other radio buttons before this one,
+ // they're not in the same group with us
+ break;
+ }
wxRadioButton *btn = wxDynamicCast(nodeAfter->GetData(),
wxRadioButton);
wxRadioButton *btn = wxDynamicCast(nodeAfter->GetData(),
wxRadioButton);
- if ( !btn || btn->HasFlag(wxRB_GROUP) )
+ if ( btn && (btn->HasFlag(wxRB_GROUP) || btn->HasFlag(wxRB_SINGLE) ) )
{
// no more buttons or the first button of the next group
break;
}
{
// no more buttons or the first button of the next group
break;
}
+ if (btn)
+ btn->SetValue(false);