Project

General

Profile

Revision a53422d5

IDa53422d5abb3c21758eb480790873f75aae1e819
Parent c1b8ad39
Child 73a8b27a

Added by Katja Luther 12 months ago

ref #8136: fix handling if status is set to null

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameTypeDesignationElement.java
87 87
		} else if (eventSource == selection_typeName) {
88 88
			getEntity().setTypeName(selection_typeName.getEntity());
89 89
		} else if (eventSource == combo_typeStatus) {
90
		    if (entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
91
                boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
90
		    if ((combo_typeStatus.getSelection() == null && entity.getCitation() != null)){
91
		        boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
92
                if (!ok){
93
                    combo_typeStatus.setSelection(entity.getTypeStatus());
94
                    return;
95
                }
96
		    }else if ( entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
97
		        boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
92 98
                if (!ok){
93 99
                    combo_typeStatus.setSelection(entity.getTypeStatus());
94 100
                    return;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SpecimenTypeDesignationElement.java
81 81
	    super.handleEvent(eventSource);
82 82
		if (eventSource == combo_typeStatus) {
83 83

  
84
		    if (entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
84
		    if ((combo_typeStatus.getSelection() == null && entity.getCitation() != null) || ( entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null)){
85 85
		        boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
86 86
		        if (!ok){
87 87
		            combo_typeStatus.setSelection(entity.getTypeStatus());

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)