summaryrefslogtreecommitdiffstats
path: root/library/scale.tcl
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2014-10-30 21:50:07 (GMT)
committerfvogel <fvogelnew1@free.fr>2014-10-30 21:50:07 (GMT)
commitc58fbb3f9791fad348f5441c96d26b1015e0098c (patch)
treece5d57296546ef6dc8f65bdb89aa7e8ea60c237c /library/scale.tcl
parent277e4c03ced86ddf627807595297854fac523c9a (diff)
downloadtk-c58fbb3f9791fad348f5441c96d26b1015e0098c.zip
tk-c58fbb3f9791fad348f5441c96d26b1015e0098c.tar.gz
tk-c58fbb3f9791fad348f5441c96d26b1015e0098c.tar.bz2
Fixed bug [3529885fff]
Diffstat (limited to 'library/scale.tcl')
-rw-r--r--library/scale.tcl8
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}]