From 779cc0f7658b4504a9a275731b0a22002dc3723a Mon Sep 17 00:00:00 2001 From: Mike Duff Date: Thu, 6 Jun 2013 17:12:16 -0500 Subject: [PATCH] Issue #2076 - fix hydro TS control dialog station list selection and graph button enabling Change-Id: I4e53b03fe12453dd8c78231c20fba6889833db9e Former-commit-id: 7e9c529c60345dca4c94ed6baa81dc8b0b2c6100 [formerly ae2c0314eef5998aabcf9323ef33de7cdf378a7f] Former-commit-id: 9a4f0e8679138006f29db6b8960e5eb7dbd22791 --- .../com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java index 57bdf49c89..70017bfcb3 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java @@ -121,6 +121,7 @@ import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil; * 30 Jan 2013 15264 wkwock Fix the missing group_definition.cfg file crash * 05 Feb 2013 1578 rferrel Dialog made non-blocking and a singleton. * 06 May 2013 1976 mpduff Code cleanup. + * 06 Jun 2013 2076 mpduff Fix station list selection and graph button enabling. * * * @author lvenable @@ -678,6 +679,8 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { if (rsc instanceof MultiPointResource) { ((MultiPointResource) rsc).setTs(this); } + + checkBottomButtons(); } /** @@ -1460,7 +1463,9 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { while (iter2.hasNext()) { if (idRdo.getSelection()) { if (iter2.next().equalsIgnoreCase(currentLid)) { - topDataList.setSelection(iter2.previousIndex()); + // Bug with show selection requires the select(0) first. + topDataList.select(0); + topDataList.select(iter2.previousIndex()); topDataList.showSelection(); /* set to null so we don't enter this block again */ @@ -2606,6 +2611,5 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { @Override protected void preOpened() { super.preOpened(); - checkBottomButtons(); } }