From 719f03c9a210df0b98baf7d58516bbd6b6ed3164 Mon Sep 17 00:00:00 2001 From: "steve.naples" Date: Tue, 10 Mar 2015 18:27:05 +0000 Subject: [PATCH] ASM #14554 - MPE: Best Estimate QPE changes with polygon after saving. - Changed to removed polygon after the save. Change-Id: Icd4f867e07c6ec1f850cc1e8e73fd31d98dbbb46 Former-commit-id: 53b54a10737c179da5efa6610c6e4325d570a768 [formerly d369e6f5eeb6463813982784207d234fb48cc3b7] Former-commit-id: ac2b2bc0f050f40ab0515b4112bdddb105bdaea2 --- .../com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java | 6 ++++++ .../viz/mpe/ui/dialogs/polygon/PolygonEditManager.java | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java index 4b94128770..a74d03bb52 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/SaveBestEstimate.java @@ -53,6 +53,7 @@ import com.raytheon.viz.mpe.core.MPEProcessGrib; import com.raytheon.viz.mpe.ui.Activator; import com.raytheon.viz.mpe.ui.DisplayFieldData; import com.raytheon.viz.mpe.ui.MPEDisplayManager; +import com.raytheon.viz.mpe.ui.dialogs.polygon.PolygonEditManager; /** * @@ -69,6 +70,7 @@ import com.raytheon.viz.mpe.ui.MPEDisplayManager; * * Apr29, 2014 16308 lbousaidi transmit RFC Bias when an hour * MPE is saved via the GUI. + * Mar 10, 2015 14554 snaples Added check to remove Best Estimate polygons after saving. * * * @author mschenke @@ -282,6 +284,10 @@ public class SaveBestEstimate { } + } + File qpePolyFile = PolygonEditManager.getHourlyEditFile(bestEstField, editDate); + if(qpePolyFile.exists()){ + qpePolyFile.delete(); } MPEDisplayManager.getCurrent().setSavedData(true); } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/polygon/PolygonEditManager.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/polygon/PolygonEditManager.java index b4c7e7d78b..e755ddf582 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/polygon/PolygonEditManager.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/polygon/PolygonEditManager.java @@ -23,6 +23,7 @@ * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jan 7, 2015 16954 cgobs Fix for cv_use issue - using getFieldName() in certain parts. + * Mar 10, 2015 14554 snaples Made getHourlyEditFile public to be accessed from Save Best Estimate. * **/ package com.raytheon.viz.mpe.ui.dialogs.polygon; @@ -295,7 +296,7 @@ public class PolygonEditManager { } } - private static File getHourlyEditFile(DisplayFieldData fieldData, Date date) { + public static File getHourlyEditFile(DisplayFieldData fieldData, Date date) { String fieldname = fieldData.getFieldName(); String polygonDir = MPEDisplayManager.getPolygonEditDir();