- // even if there are other radio buttons before this one,
- // they're not in the same group with us
- break;
+ wxRadioButton *btn = wxDynamicCast(nodeBefore->GetData(),
+ wxRadioButton);
+ if ( !btn )
+ {
+ // the radio buttons in a group must be consecutive, so
+ // there are no more of them
+ 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;
+ }