Merge "Issue #1589 - Fix saving of custom subset areas in spatial subset tab" into development

Former-commit-id: 138ccd44e4bc5934bb778c11e5f62036c8d18418
This commit is contained in:
Dustin Johnson 2013-02-20 15:39:00 -06:00 committed by Gerrit Code Review
commit 6c9bb4366a

View file

@ -58,6 +58,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
* Dec 07, 2012 1278 bgonzale additional param to AreaComp ctor. * Dec 07, 2012 1278 bgonzale additional param to AreaComp ctor.
* Dec 18, 2012 1439 mpduff Redo subset name validation. * Dec 18, 2012 1439 mpduff Redo subset name validation.
* Dec 10, 2012 1259 bsteffen Switch Data Delivery from LatLon to referenced envelopes. * Dec 10, 2012 1259 bsteffen Switch Data Delivery from LatLon to referenced envelopes.
* Feb 20, 2013 1589 mpduff Fix to allow saving custom areas.
* *
* </pre> * </pre>
* *
@ -251,7 +252,6 @@ public class SpatialSubsetTab extends SubsetTab implements IDataSize {
return; return;
} }
AreaXML area = getSaveInfo(); AreaXML area = getSaveInfo();
SubsetFileManager.getInstance() SubsetFileManager.getInstance()
@ -346,12 +346,12 @@ public class SpatialSubsetTab extends SubsetTab implements IDataSize {
*/ */
public AreaXML getSaveInfo() { public AreaXML getSaveInfo() {
ReferencedEnvelope envelope = null; ReferencedEnvelope envelope = null;
if(useDataSetSize){ if (useDataSetSize) {
envelope = fullEnvelope; envelope = fullEnvelope;
} else { } else {
envelope = areaComp.getEnvelope(); envelope = areaComp.getEnvelope();
} }
AreaXML area = new AreaXML(); AreaXML area = new AreaXML();
if (envelope != null) { if (envelope != null) {
@ -362,6 +362,8 @@ public class SpatialSubsetTab extends SubsetTab implements IDataSize {
if (areaComp.selectCombo.getEnabled()) { if (areaComp.selectCombo.getEnabled()) {
area.setRegionName(name); area.setRegionName(name);
} else {
area.setRegionName(getRegionSaveText());
} }
return area; return area;
} }