From cc6380ba3325cc1f0f232978d3c7d54a7d3cc3aa Mon Sep 17 00:00:00 2001 From: Lee Venable Date: Wed, 16 Apr 2014 15:39:34 -0500 Subject: [PATCH] Issue #3037 - Add dispose check in runAsync call. Change-Id: I13c7475f8c56f677f3dbdfab8d6000061db86f9f Former-commit-id: 6b0468f07eaad88a21203daaf9d5d76fb12caf64 [formerly 33fc376f33ef2f9ea18f12b66584f444c85f699f] [formerly 7386d4b3186d998a789642f2304004a4e8b8659a [formerly c511ef6d5566f0e1d9ae3d5ea886abbf1159d41a]] Former-commit-id: 7386d4b3186d998a789642f2304004a4e8b8659a Former-commit-id: 98e9912a94025e979691e4172275e3af3410302f --- .../com/raytheon/viz/ui/dialogs/ImagingDialog.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ImagingDialog.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ImagingDialog.java index 0614933e6c..9268d210d4 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ImagingDialog.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ImagingDialog.java @@ -90,6 +90,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor; * Jan 15, 2014 2313 bsteffen Disable color map selection when * ColorMapCapability is not present. * Apr 08, 2014 2905 bsteffen Add option to interpolate colors. + * Apr 16, 2014 3037 lvenable Add dispose check in runAsync call. * * * @@ -812,7 +813,8 @@ public class ImagingDialog extends CaveSWTDialog implements contrastText.setText(contrastScale.getSelection() + "%"); - interpolateImageCheckbox.setSelection(imgCap.isInterpolationState()); + interpolateImageCheckbox + .setSelection(imgCap.isInterpolationState()); } else { topColorMapButton.setText("Top image is not displayed."); topColormapComp.getCMapButton().setText("Not Selected"); @@ -936,7 +938,8 @@ public class ImagingDialog extends CaveSWTDialog implements ((GridData) alphaLabel.getLayoutData()).exclude = true; } - interpolateImageCheckbox.setSelection(imgCap.isInterpolationState()); + interpolateImageCheckbox + .setSelection(imgCap.isInterpolationState()); } else { brightnessText.setVisible(false); contrastText.setVisible(false); @@ -967,6 +970,11 @@ public class ImagingDialog extends CaveSWTDialog implements VizApp.runAsync(new Runnable() { @Override public void run() { + // If the dialog has been disposed then return. + if (isDisposed()) { + return; + } + refreshComponents(); } });