changeset 8781:13970a967383 8u60-b03

RT-40025: NumberAxis generates incorrect Tick values
author jgiles
date Mon, 16 Feb 2015 15:18:55 +1300
parents 663ad6b1defc
children 5d3d6549067c 0c2667adcd14 ec2685373129
files modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Sat Feb 14 10:32:21 2015 -0500
+++ b/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Mon Feb 16 15:18:55 2015 +1300
@@ -249,7 +249,9 @@
                     // If tickUnit is integer, start with the nearest integer
                     double first = Math.rint(tickUnit) == tickUnit ? Math.ceil(lowerBound) : lowerBound + tickUnit;
                     for (double major = first; major < upperBound; major += tickUnit) {
-                        tickValues.add(major);
+                        if (!tickValues.contains(major)) {
+                            tickValues.add(major);
+                        }
                     }
                 }
             }