diff options
author | dgp <dgp@users.sourceforge.net> | 2014-11-07 14:22:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-11-07 14:22:05 (GMT) |
commit | 054420d1e3b71ea9d657396bb42d92472b0d7e88 (patch) | |
tree | 2b4547b0fdbf3c85aef0cfcb1be9c36279417c24 /library | |
parent | 1d9e044ef59c5a3e36e20c161ecd5b8e4b09ad3c (diff) | |
parent | fcc39af8d8691cdcc0ce49efe09ad61b94da9ba0 (diff) | |
download | tk-054420d1e3b71ea9d657396bb42d92472b0d7e88.zip tk-054420d1e3b71ea9d657396bb42d92472b0d7e88.tar.gz tk-054420d1e3b71ea9d657396bb42d92472b0d7e88.tar.bz2 |
[3529885] [scale] handle negative resolution properly.
Diffstat (limited to 'library')
-rw-r--r-- | library/scale.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/scale.tcl b/library/scale.tcl index d9e7d27..fb9b81b 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -223,7 +223,13 @@ proc ::tk::ScaleIncrement {w dir big repeat} { set inc [$w cget -resolution] } if {([$w cget -from] > [$w cget -to]) ^ ($dir eq "up")} { - set inc [expr {-$inc}] + if {$inc > 0} { + set inc [expr {-$inc}] + } + } else { + if {$inc < 0} { + set inc [expr {-$inc}] + } } $w set [expr {[$w get] + $inc}] |