changeset 2623:c4591312f3d3

Fixed step calculation in W/Q range input mode. flys-artifacts/trunk@4209 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 11 Apr 2012 09:17:03 +0000
parents 8bc1e1cb7f7b
children 3f24865082da
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Fri Apr 06 10:12:34 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Apr 11 09:17:03 2012 +0000
@@ -1,3 +1,8 @@
+2012-04-11  Raimund Renkert <raimund.renkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/WQSelect.java:
+	  Use factor to calculate steps in range input mode.
+
 2012-04-06	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* doc/conf/cache.xml: Increased number of fixings columns a bit.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java	Fri Apr 06 10:12:34 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java	Wed Apr 11 09:17:03 2012 +0000
@@ -343,14 +343,14 @@
 
 
     protected static double getSteps(double steps, double factor) {
-        int    fac  = (int) steps / 10;
-        double diff = steps - fac * 10;
+        int    fac  = (int) (steps / factor);
+        double diff = steps - fac * factor;
 
         if (diff == 0) {
             return steps;
         }
 
-        return 10d * (fac + 1);
+        return factor * (fac + 1);
     }
 
 

http://dive4elements.wald.intevation.org