Mercurial > dive4elements > river
changeset 8400:319aa972a1a3 3.1.7
Fixed date filter for fix overview.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 09 Oct 2014 12:13:56 +0200 |
parents | c668520cc5fb |
children | 5b3947bac65d |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FixFilter.java |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java Thu Oct 09 12:20:48 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/fixation/FixationPanel.java Thu Oct 09 12:13:56 2014 +0200 @@ -427,7 +427,7 @@ protected static JSONObject createFilter(FixFilter filter, JSONObject root) { double fromKm = filter.getFromKm(); double toKm = filter.getToKm(); - boolean hasDate = filter.getFromDate() > 0 && filter.getToDate() > 0; + boolean hasDate = filter.hasDate(); if (fromKm >= 0 && toKm >= 0 && fromKm <= toKm) { JSONObject range = new JSONObject();
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FixFilter.java Thu Oct 09 12:20:48 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FixFilter.java Thu Oct 09 12:13:56 2014 +0200 @@ -31,8 +31,8 @@ this.currentKm = -1; this.fromClass = -1; this.toClass = -1; - this.fromDate = -1; - this.toDate = -1; + this.fromDate = Long.MIN_VALUE; + this.toDate = Long.MIN_VALUE; this.hasDate = false; this.events = new int[0]; } @@ -110,5 +110,9 @@ public int[] getEvents() { return this.events; } + + public boolean hasDate() { + return fromDate != Long.MIN_VALUE && toDate != Long.MIN_VALUE; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :