diff options
author | dgp <dgp@users.sourceforge.net> | 2014-11-07 14:20:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-11-07 14:20:14 (GMT) |
commit | fcc39af8d8691cdcc0ce49efe09ad61b94da9ba0 (patch) | |
tree | 16e75caa03c5f8899171780cf48367d294c3c2c1 /library | |
parent | ba46065bdddd77146da41ff64ffd1f6dce7189e1 (diff) | |
parent | 047316eaff14d14c10caa5f0742c426f3963c60b (diff) | |
download | tk-fcc39af8d8691cdcc0ce49efe09ad61b94da9ba0.zip tk-fcc39af8d8691cdcc0ce49efe09ad61b94da9ba0.tar.gz tk-fcc39af8d8691cdcc0ce49efe09ad61b94da9ba0.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 b4da824..771c7a4 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}] |