} else if (eventSource == selection_typeName) {
getEntity().setTypeName(selection_typeName.getEntity());
} else if (eventSource == combo_typeStatus) {
- if (entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
- boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
+ if ((combo_typeStatus.getSelection() == null && entity.getCitation() != null)){
+ boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
+ if (!ok){
+ combo_typeStatus.setSelection(entity.getTypeStatus());
+ return;
+ }
+ }else if ( entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
+ boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
if (!ok){
combo_typeStatus.setSelection(entity.getTypeStatus());
return;
super.handleEvent(eventSource);
if (eventSource == combo_typeStatus) {
- if (entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
+ if ((combo_typeStatus.getSelection() == null && entity.getCitation() != null) || ( entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null)){
boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
if (!ok){
combo_typeStatus.setSelection(entity.getTypeStatus());