summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-08-17 21:17:02 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-08-17 21:17:02 (GMT)
commitb60b0d50f5e96a40b302de1be13f383e98148aec (patch)
tree5aeb39f2e9c7ce066d87fe9e14703c60f47ca9ef
parent68e290fdc0f4ae976acc38fe78754df0481b6acb (diff)
parent69ce8a993ddb35eab3f80ad353471e43db57bd1e (diff)
downloadtk-b60b0d50f5e96a40b302de1be13f383e98148aec.zip
tk-b60b0d50f5e96a40b302de1be13f383e98148aec.tar.gz
tk-b60b0d50f5e96a40b302de1be13f383e98148aec.tar.bz2
Micro-optimization in tkScale.c, following no-op observation provided in [81c3ef9314].
-rw-r--r--generic/tkScale.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 5957b00..825f661 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -658,13 +658,11 @@ ConfigureScale(
}
}
- /*
- * Several options need special processing, such as parsing the
- * orientation and creating GCs.
- */
+ /*
+ * The fromValue shall not be rounded to the resolution, but the
+ * toValue and tickInterval do.
+ */
- scalePtr->fromValue = TkRoundValueToResolution(scalePtr,
- scalePtr->fromValue);
scalePtr->toValue = TkRoundValueToResolution(scalePtr, scalePtr->toValue);
scalePtr->tickInterval = TkRoundIntervalToResolution(scalePtr,
scalePtr->tickInterval);