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 | 29365745fb90efc1a5ee27040f1767ebb8e04175 (patch) | |
tree | 2b4547b0fdbf3c85aef0cfcb1be9c36279417c24 /library | |
parent | d7203748fca734700dbf46f3119b79829aec6618 (diff) | |
parent | 8067434f8a2a55d874ed2ddb9cd2bfc6e20c3e01 (diff) | |
download | tk-29365745fb90efc1a5ee27040f1767ebb8e04175.zip tk-29365745fb90efc1a5ee27040f1767ebb8e04175.tar.gz tk-29365745fb90efc1a5ee27040f1767ebb8e04175.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}] |