# HG changeset patch # User Raimund Renkert # Date 1327405726 0 # Node ID 2b104fa094e2ab19549cccd00fb10b231a277bb2 # Parent 4f4d29404dba972e5d819e5e90acd318ce46e9fc Added filter criterion and clear filter on tab selection changed and input mode changed. flys-client/trunk@3755 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 4f4d29404dba -r 2b104fa094e2 flys-client/ChangeLog --- a/flys-client/ChangeLog Tue Jan 24 08:46:33 2012 +0000 +++ b/flys-client/ChangeLog Tue Jan 24 11:48:46 2012 +0000 @@ -1,3 +1,9 @@ +2012-01-24 Raimund Renkert + + * src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java: + Added filter criterion and clear filter on tab selection changed and + input mode changed. + 2012-01-24 Raimund Renkert * src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java: diff -r 4f4d29404dba -r 2b104fa094e2 flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Tue Jan 24 08:46:33 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationDistancePanel.java Tue Jan 24 11:48:46 2012 +0000 @@ -694,6 +694,7 @@ inputTables.addTabSelectedHandler(new TabSelectedHandler() { public void onTabSelected(TabSelectedEvent evt) { filterDescription.clear(); + filterRange.clear(); } }); @@ -827,9 +828,15 @@ new Criterion("to", OperatorId.LESS_OR_EQUAL, to) }); + AdvancedCriteria c3 = + new AdvancedCriteria(OperatorId.AND, new Criterion[] { + new Criterion("from", OperatorId.LESS_OR_EQUAL, to), + new Criterion("to", OperatorId.GREATER_OR_EQUAL, from) + }); + combinedFilter = new AdvancedCriteria(OperatorId.OR, new Criterion[] { - c1, c2 + c1, c2, c3 }); } locationsTable.filterData(combinedFilter); @@ -1127,6 +1134,7 @@ if (value.equals(FIELD_VALUE_LOCATION)) { enableLocationPanel(); filterDescription.clear(); + filterRange.clear(); // Remove the tab containing the locationDistanceTable. // The 'updateTab()' avoids the tab content to be destroyed. inputTables.updateTab(0, null); @@ -1143,6 +1151,7 @@ else { enableDistancePanel(); filterDescription.clear(); + filterRange.clear(); // Remove the tab containing the locationTable. // The 'updateTab()' avoids the tab content to be destroyed. inputTables.updateTab(0, null);