# HG changeset patch # User gernotbelger # Date 1532014612 -7200 # Node ID ff9372d0cc1c57dd4523f6df491950096b37da12 # Parent 1c8eeaf6031f26559b7cecfd3af082836c7cbc58 All gauges should be collapsed during selection of calc mode diff -r 1c8eeaf6031f -r ff9372d0cc1c gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java Thu Jul 19 17:33:24 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeListGrid.java Thu Jul 19 17:36:52 2018 +0200 @@ -210,7 +210,11 @@ } if (!locations.isEmpty()) { openOnLocations(locations); - } else { + } else if( this.data != null && this.data.length == 1 ){ + // During selection of calc-mode: all gauges should be collapsed + collapseAll(); + } + else { openAll(); } } @@ -226,6 +230,16 @@ } } + private void collapseAll() { + + GWT.log("InfoListGrid - openAll"); + + setData(new ListGridRecord[] {}); + for (final GaugeInfo gauge : this.gauges) { + addCollapsedRecord(gauge); + } + } + void getLocations(final String labelname, final List locations, final DataList dl) { for (int j = dl.size() - 1; j >= 0; --j) { final Data d = dl.get(j);