Issue #2119 Added check when no selected lid.
Change-Id: Ia85dbc8957353ba44e94f7aa7b28cab0787165ac Former-commit-id:541b7fbc93
[formerlydc5059f06b
] [formerly541b7fbc93
[formerlydc5059f06b
] [formerlye7dc1184b1
[formerly 4a64a5b44a05a1c91b9a3d878ea0806e68c6d788]]] Former-commit-id:e7dc1184b1
Former-commit-id:dc0e31fcdd
[formerly440ea0fc25
] Former-commit-id:c549efa0c1
This commit is contained in:
parent
83081bebe2
commit
a4bee23421
2 changed files with 13 additions and 22 deletions
|
@ -40,6 +40,7 @@ import com.raytheon.viz.hydrocommon.HydroDisplayManager;
|
|||
* 6/27/06 lvenable Initial creation.
|
||||
* 02/07/2013 1578 rferrel Changes for non-blocking ProductViewerDlg.
|
||||
* 03/27/2013 1790 rferrel Bug fix for non-blocking dialogs.
|
||||
* 06/19/2013 2119 rferrel Changed check for no selected lid.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,19 +60,18 @@ public class ProductViewerAction extends AbstractHandler {
|
|||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
String currentLid = HydroDisplayManager.getInstance().getCurrentLid();
|
||||
HydroDisplayManager manager = HydroDisplayManager.getInstance();
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
|
||||
if (dialog == null || dialog.isDisposed()) {
|
||||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
dialog = new ProductViewerDlg(shell);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.bringToTop();
|
||||
}
|
||||
if (currentLid != null) {
|
||||
dialog.setLid(currentLid);
|
||||
if (manager.isCurrentLidSelected(shell)) {
|
||||
if (dialog == null || dialog.isDisposed()) {
|
||||
dialog = new ProductViewerDlg(shell);
|
||||
dialog.open();
|
||||
} else {
|
||||
dialog.setLid(manager.getCurrentLid());
|
||||
dialog.bringToTop();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 12/11/2009 2488 mpduff Refactored dialog to work as
|
||||
* in AWIPS 1
|
||||
* 02/07/2013 1578 rferrel Make dialog non-blocking.
|
||||
* 06/19/2013 2119 rferrel Remove no longer needed shouldOpen.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -211,16 +212,6 @@ public class ProductViewerDlg extends CaveSWTDialog {
|
|||
loadProductList();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#shouldOpen()
|
||||
*/
|
||||
@Override
|
||||
protected boolean shouldOpen() {
|
||||
return HydroDisplayManager.getInstance().isCurrentLidSelected(shell);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the Product Information group container.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue