changeset 7840:0b9677f61b09 8u40-b03

RT-38415: Cannot start Modena application Reviewed-by: kcr Contributed-by: msladecek
author kcr
date Mon, 25 Aug 2014 11:57:57 -0700
parents ae965899921b
children 7d615105f443 a2dda1afa7b5 2676b22761e5
files modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Sat Aug 23 12:23:59 2014 +0400
+++ b/modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java	Mon Aug 25 11:57:57 2014 -0700
@@ -54,8 +54,6 @@
 import javafx.css.Styleable;
 import javafx.css.StyleableProperty;
 
-import javax.swing.text.DefaultFormatter;
-
 /**
  * A axis class that plots a range of numbers with major tick marks every "tickUnit". You can use any Number type with
  * this axis, Long, Double, BigDecimal etc.
@@ -430,7 +428,7 @@
             if (numOfTickMarks == 2 && reqLength > length) {
                 break;
             }
-            if (count > 20) tickUnit *= 2; // This is just for the while loop, if there are still too many ticks
+            if (reqLength > length || count > 20) tickUnit *= 2; // This is just for the while loop, if there are still too many ticks
         }
         // calculate new scale
         final double newScale = calculateNewScale(length, minRounded, maxRounded);