Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java @ 1617:f13a7c126f24
Allow selection of multiple locations with mouse in MultipleLocationPanel.
flys-client/trunk@3986 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 09 Feb 2012 09:52:37 +0000 |
parents | 07c38d054f91 |
children | 95b821d63db3 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java Thu Feb 09 09:50:22 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MultipleLocationPanel.java Thu Feb 09 09:52:37 2012 +0000 @@ -25,6 +25,7 @@ import de.intevation.flys.client.shared.model.DataItem; import de.intevation.flys.client.shared.model.DataList; import de.intevation.flys.client.shared.model.DistanceInfoObject; +import de.intevation.flys.client.shared.DoubleUtils; import de.intevation.flys.client.shared.model.RangeData; import de.intevation.flys.client.client.services.DistanceInfoService; @@ -299,10 +300,11 @@ * @param e event passed. */ public void onRecordClick (RecordClickEvent e) { - Record record = e.getRecord(); - double[] selected = new double[1]; + Record record = e.getRecord(); + double[] old = getLocationValues(); + double[] selected = DoubleUtils.copyOf(old, old.length + 1); try { - selected[0] = + selected[old.length] = Double.parseDouble(record.getAttribute("from")); } catch(NumberFormatException nfe) {