diff options
author | fvogel <fvogelnew1@free.fr> | 2018-04-15 08:55:43 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-04-15 08:55:43 (GMT) |
commit | 510d1dc62777e065bb5e646f96ffec7411f78d94 (patch) | |
tree | d5a37841f9abfdf61430753c2fc8cd591c74c17f /generic/tkEntry.c | |
parent | 4faa4997f4fd9227d43916f5909320d075cfd6e0 (diff) | |
parent | 62c05cfac502ae7f00a33eb7f95d14458897a915 (diff) | |
download | tk-510d1dc62777e065bb5e646f96ffec7411f78d94.zip tk-510d1dc62777e065bb5e646f96ffec7411f78d94.tar.gz tk-510d1dc62777e065bb5e646f96ffec7411f78d94.tar.bz2 |
merge trunk (because tip-496 does not target 8.6 but 8.7, whereas branch tip-496 was created off core-8-6-branch)
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index d314f65..1ab5477 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1191,13 +1191,15 @@ ConfigureEntry( if (entryPtr->type == TK_SPINBOX) { if (sbPtr->fromValue > sbPtr->toValue) { - Tcl_SetObjResult(interp, Tcl_NewStringObj( - "-to value must be greater than -from value", - -1)); - Tcl_SetErrorCode(interp, "TK", "SPINBOX", "RANGE_SANITY", - NULL); - continue; - } + /* + * Swap -from and -to values. + */ + + double tmpFromTo = sbPtr->fromValue; + + sbPtr->fromValue = sbPtr->toValue; + sbPtr->toValue = tmpFromTo; + } if (sbPtr->reqFormat && (oldFormat != sbPtr->reqFormat)) { /* |