[PATCH] Purge sorting stations without range to end of list
Wald Commits
scm-commit at wald.intevation.org
Tue Oct 14 16:32:25 CEST 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1413297126 -7200
# Node ID 6c16b61ba9eb2a696761d24f2e8732759de18c3a
# Parent f1f6e32156a6100d27f5a9e583bc675344c3d69f
Purge sorting stations without range to end of list.
diff -r f1f6e32156a6 -r 6c16b61ba9eb gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/MeasurementStationListGrid.java
--- 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);
More information about the Dive4Elements-commits
mailing list