Merge "Issue #2119 Added check when no selected lid." into omaha_13.5.1
Former-commit-id:3248909c85
[formerly377bc28f63
] [formerly8b92b564d5
[formerly 2d05f18781938f3f52b70fcdcf7f1bcad60fe09e]] Former-commit-id:8b92b564d5
Former-commit-id:9b564bef6a
This commit is contained in:
commit
953ad96305
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