changeset 8408:6c16b61ba9eb

Purge sorting stations without range to end of list.
author Tom Gottfried <tom@intevation.de>
date Tue, 14 Oct 2014 16:32:06 +0200
parents f1f6e32156a6
children 8ef11fad27a2
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java
diffstat 1 files changed, 2 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java	Tue Oct 14 15:22:11 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java	Tue Oct 14 16:32:06 2014 +0200
@@ -85,41 +85,20 @@
 
         if (stations != null && !stations.isEmpty()) {
 
-            ArrayList<MeasurementStation> emptystations =
-                new ArrayList<MeasurementStation>();
-
             if (!riverinfo.isKmUp()) {
                 for (MeasurementStation station : stations) {
-                    addStation(station, emptystations);
+                    addStation(station);
                 }
             }
             else {
                 for (int i = stations.size()-1; i >= 0; i--) {
                     MeasurementStation station = stations.get(i);
-                    addStation(station, emptystations);
+                    addStation(station);
                 }
             }
-
-            // put empty stations to the end
-            for (MeasurementStation station : emptystations) {
-                addStation(station);
-            }
         }
     }
 
-    private void addStation(MeasurementStation station,
-            List<MeasurementStation> empty) {
-        /* switch off sorting stations without range to the end
-        if (station.getKmStart() != null && station.getKmEnd() != null) {
-            addStation(station);
-        }
-        else {
-            empty.add(station);
-        }
-        */
-        addStation(station);
-    }
-
     private void addStation(MeasurementStation station) {
         ListGridRecord record = new MeasurementStationRecord(station);
         this.addData(record);

http://dive4elements.wald.intevation.org