diff options
author | fvogel <fvogelnew1@free.fr> | 2016-02-25 14:40:12 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-02-25 14:40:12 (GMT) |
commit | e353dfd7b77de377b5475b760d286a0990958dd6 (patch) | |
tree | 039efe1806ca6290bb2cc672030b093b35f9edad /generic | |
parent | 612675a4f57c40b222eccf363977705fbdd848aa (diff) | |
download | tk-e353dfd7b77de377b5475b760d286a0990958dd6.zip tk-e353dfd7b77de377b5475b760d286a0990958dd6.tar.gz tk-e353dfd7b77de377b5475b760d286a0990958dd6.tar.bz2 |
Fixed bug [841280] - spinbox -from and -to defaults and behaviourbug_841280ffff
Diffstat (limited to 'generic')
-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 ea8d7f1..5681e47 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1176,13 +1176,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)) { /* |