diff options
author | pspjuth <pspjuth@noemail.net> | 2002-05-26 09:25:56 (GMT) |
---|---|---|
committer | pspjuth <pspjuth@noemail.net> | 2002-05-26 09:25:56 (GMT) |
commit | da32c7fbcf3ebde25b02d8c3729b9e35736e3914 (patch) | |
tree | 6a806b3a1ba1d3752ae6a98c16426064e1c914bd /generic/tkButton.c | |
parent | 13702177bf01f884696673c55edaf55e717f9359 (diff) | |
download | tk-da32c7fbcf3ebde25b02d8c3729b9e35736e3914.zip tk-da32c7fbcf3ebde25b02d8c3729b9e35736e3914.tar.gz tk-da32c7fbcf3ebde25b02d8c3729b9e35736e3914.tar.bz2 |
When creating a radiobutton with -value "" it was not drawn properly
if the -variable was created by the radiobutton. [Bug #548765]
FossilOrigin-Name: 43f195e282d0c2f80354413944f3ffaab6c33d5f
Diffstat (limited to 'generic/tkButton.c')
-rw-r--r-- | generic/tkButton.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/generic/tkButton.c b/generic/tkButton.c index 7cc4803..fc9eab1 100644 --- a/generic/tkButton.c +++ b/generic/tkButton.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.c,v 1.16 2002/03/20 22:55:16 dgp Exp $ + * RCS: @(#) $Id: tkButton.c,v 1.17 2002/05/26 09:25:56 pspjuth Exp $ */ #include "tkButton.h" @@ -1129,6 +1129,16 @@ ConfigureButton(interp, butPtr, objc, objv) == NULL) { continue; } + + /* + * If a radiobutton has the empty string as value + * it should be selected. + */ + + if ((butPtr->type == TYPE_RADIO_BUTTON) && + (*Tcl_GetString(butPtr->onValuePtr) == 0)) { + butPtr->flags |= SELECTED; + } } } |