[PATCH] issue1542: Do not show link to w/q value view if no mainvalues are there
Wald Commits
scm-commit at wald.intevation.org
Tue Nov 12 17:45:46 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1384274764 -3600
# Node ID 22b5d1c6e2c063e64fdb2400a80ce5622af2b719
# Parent 368d419ae4d10d7d1c5e50a67722ed9d75b243bb
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.
diff -r 368d419ae4d1 -r 22b5d1c6e2c0 gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java
--- 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);
}
More information about the Dive4elements-commits
mailing list