summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkScale.c10
-rw-r--r--generic/tkScale.h6
2 files changed, 4 insertions, 12 deletions
diff --git a/generic/tkScale.c b/generic/tkScale.c
index 258a1fa..69a7d91 100644
--- a/generic/tkScale.c
+++ b/generic/tkScale.c
@@ -632,12 +632,7 @@ ConfigureScale(
scalePtr->tickInterval = -scalePtr->tickInterval;
}
- if (scalePtr->digits > TCL_MAX_PREC) {
- Tcl_AppendResult(interp, "too large -digits value", NULL);
- continue;
- } else {
- ComputeFormat(scalePtr);
- }
+ ComputeFormat(scalePtr);
scalePtr->labelLength = scalePtr->label ? (int)strlen(scalePtr->label) : 0;
@@ -813,6 +808,9 @@ ComputeFormat(
*/
numDigits = scalePtr->digits;
+ if (numDigits > TCL_MAX_PREC) {
+ numDigits = 0;
+ }
if (numDigits <= 0) {
if (scalePtr->resolution > 0) {
/*
diff --git a/generic/tkScale.h b/generic/tkScale.h
index f406bf6..a2c5f2b 100644
--- a/generic/tkScale.h
+++ b/generic/tkScale.h
@@ -220,12 +220,6 @@ typedef struct TkScale {
#define SPACING 2
/*
- * How many characters of space to provide when formatting the scale's value:
- */
-
-#define PRINT_CHARS 150
-
-/*
* Declaration of procedures used in the implementation of the scale widget.
*/