@Override
protected void cancelPressed() {
- boolean result = MessageDialog.openConfirm(getShell(), "Do you really want to cancel", "Aborting the login procedure will close the database.");
-
- if(result){
- CdmStore.close(StoreUtil.getMonitor());
+ if(CdmStore.getLoginManager().getAuthenticatedUser() != null){
super.cancelPressed();
+ }else{
+ // if there is no active user and the current user chooses to cancel, we close the connection
+ boolean result = MessageDialog.openConfirm(getShell(), "Do you really want to cancel", "Aborting the login procedure will close the database.");
+
+ if(result){
+ CdmStore.close(StoreUtil.getMonitor());
+ super.cancelPressed();
+ }
}
}
}