Issue #2833 - fixed subset dialog from disappearing when the subscription button double clicked.

Former-commit-id: d74b2c0118 [formerly bb4b034375] [formerly 94cede8153] [formerly e0ee93bab3 [formerly 94cede8153 [formerly a075d26c10bf7459419180f416d3e9ccefb94075]]]
Former-commit-id: e0ee93bab3
Former-commit-id: 08d8e41d0aefbc0220f2fd973374918a413db9bb [formerly e0fbc02307]
Former-commit-id: 91d419662c
This commit is contained in:
Lee Venable 2014-02-26 13:21:58 -06:00
parent 85a16601ed
commit de2bff4d95

View file

@ -143,6 +143,8 @@ import com.raytheon.viz.ui.presenter.IDisplay;
* Jan 14, 2014 2459 mpduff Change Subscription status code
* Jan 20, 2014 2538 mpduff Call doesNameExist method to check for dupes
* Feb 11, 2014 2771 bgonzale Use Data Delivery ID instead of Site.
* Feb 26, 2014 #2833 lvenable Added code to prevent the Subset (this) dialog from
* disappearing when the Subscription button is double clicked.
* </pre>
*
* @author mpduff
@ -417,7 +419,7 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
int buttonWidth = 87;
GridData btnData = new GridData(buttonWidth, SWT.DEFAULT);
Button subscribeBtn = new Button(bottomComp, SWT.PUSH);
final Button subscribeBtn = new Button(bottomComp, SWT.PUSH);
if (!create) {
subscribeBtn.setText("Continue...");
subscribeBtn.setToolTipText("Click to continue editing");
@ -430,6 +432,14 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
subscribeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
/*
* Need to disable the Subscription button as it takes time to
* do all of the validation. Once the subscription dialog
* returns the button will enable.
*/
subscribeBtn.setEnabled(false);
if (subscription == null) {
launchCreateSubscriptionGui(createSubscription(
new SiteSubscription(), Network.OPSNET));
@ -438,6 +448,9 @@ public abstract class SubsetManagerDlg extends CaveSWTDialog implements
subscription.getRoute());
launchCreateSubscriptionGui(subscription);
}
// Enable the button.
subscribeBtn.setEnabled(true);
}
});