# HG changeset patch # User Ingo Weinzierl # Date 1325076416 0 # Node ID 87f9153bb7cac26b2a588a642f2c01997cccf5a9 # Parent 3ffb7195173f78a2fef44b3783c59960d840057e Fixed order to determine correct step width of Qs and Ws. flys-artifacts/trunk@3554 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 3ffb7195173f -r 87f9153bb7ca flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Dec 28 12:39:35 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Dec 28 12:46:56 2011 +0000 @@ -1,3 +1,8 @@ +2011-12-28 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/states/WQSelect.java: Fixed + broken order to determine the step width of Qs and Ws. + 2011-12-28 Ingo Weinzierl flys/issue104 (W-INFO: Wasserspiegellagenberechnung / Strecke) diff -r 3ffb7195173f -r 87f9153bb7ca flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Wed Dec 28 12:39:35 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WQSelect.java Wed Dec 28 12:46:56 2011 +0000 @@ -256,14 +256,14 @@ double diff = min < max ? max - min : min - max; double step = diff / MAX_STEPS; - if (step < 1000) { - return getSteps(step, 100); + if (step < 10) { + return getSteps(step, 1); } else if (step < 100) { return getSteps(step, 10); } - else if (step < 10) { - return getSteps(step, 1); + else if (step < 1000) { + return getSteps(step, 100); } else { return step; @@ -275,14 +275,14 @@ double diff = min < max ? max - min : min - max; double step = diff / MAX_STEPS; - if (step < 1000) { - return getSteps(step, 100); + if (step < 10) { + return getSteps(step, 1); } else if (step < 100) { return getSteps(step, 10); } - else if (step < 10) { - return getSteps(step, 1); + else if (step < 1000) { + return getSteps(step, 100); } else { return step;