Mercurial > dive4elements > river
changeset 7562:22b5d1c6e2c0
issue1542: Do not show link to w/q value view if no mainvalues are there.
Do not add empty space if no q or w value range will be shown.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 12 Nov 2013 17:46:04 +0100 |
parents | 368d419ae4d1 |
children | 04cc2dee911e |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Tue Nov 12 17:15:21 2013 +0100 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Tue Nov 12 17:46:04 2013 +0100 @@ -16,6 +16,7 @@ import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.Label; +import com.smartgwt.client.util.SC; import org.dive4elements.river.client.client.FLYS; import org.dive4elements.river.client.client.FLYSConstants; @@ -85,11 +86,18 @@ HLayout line5 = new HLayout(); line5.addMember(new GaugeMainValueAnchor(flys, gauge)); - grid.addMember(line1); - grid.addMember(line2); + if (minw != null && maxw != null) { + grid.addMember(line1); + } + if (minq != null && maxq != null) { + grid.addMember(line2); + } grid.addMember(line3); grid.addMember(line4); - grid.addMember(line5); + // Do not show link if no values anyway. + if (minw != null && maxw != null && minq != null && maxq != null) { + grid.addMember(line5); + } addMember(grid); }