diff --git a/xi/xiutils.c b/xi/xiutils.c index 94d7eeced..5c9052e7a 100755 --- a/xi/xiutils.c +++ b/xi/xiutils.c @@ -2874,25 +2874,28 @@ xi_check( XI_OBJ * xi_obj, BOOLEAN check ) case XIBT_TABBTN: { XinWindow wins[MAX_RADIO_BUTTONS]; - XI_BTN_TYPE type; + //XI_BTN_TYPE type; XI_OBJ *parent; - type = xi_obj->v.btn->type; + //type = xi_obj->v.btn->type; parent = xi_obj->parent; - if ( parent->type == XIT_CONTAINER && - ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) ) + if ( parent->type == XIT_CONTAINER /* && + ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) */) { - int i; + if (check) + { + int i; - if ( parent->nbr_children > MAX_RADIO_BUTTONS ) - XinError( 20089, XinSeverityFatal, 0L ); - for ( i = 0; i < parent->nbr_children; ++i ) - wins[i] = parent->children[i]->v.btn->btnctl; - XinWindowCheckRadioButton( btn->btnctl, wins, - parent->nbr_children ); - return; + if ( parent->nbr_children > MAX_RADIO_BUTTONS ) + XinError( 20089, XinSeverityFatal, 0L ); + for ( i = 0; i < parent->nbr_children; ++i ) + wins[i] = parent->children[i]->v.btn->btnctl; + XinWindowCheckRadioButton( btn->btnctl, wins, + parent->nbr_children ); + } + //return; } - if ( type == XIBT_RADIOBTN || type == XIBT_TABBTN ) + else { XinWindowCheckBox( btn->btnctl, check ); return;