adapt editor to changes in typestatus.isLectotype -> hasDesignationSourcve
authorKatja Luther <k.luther@bgbm.org>
Tue, 22 Oct 2019 11:46:00 +0000 (13:46 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 22 Oct 2019 11:46:00 +0000 (13:46 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/AbstractTypeDesignationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameTypeDesignationElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/SpecimenTypeDesignationElement.java

index 5ce3fedff7cc4331e4a9f47b48c8545c7dece31d..bdddbffb3e56c6ba5187b22b17c4c5f151667228 100644 (file)
@@ -76,7 +76,7 @@ public abstract class AbstractTypeDesignationElement<T extends TypeDesignationBa
            super.setEntity(entity);
            sourceSection.setEntity(entity);
 
-           if (this.entity != null && this.entity.isLectoType()){
+           if (this.entity != null && this.entity.hasDesignationSource()){
                if (selection_reference == null){
                    removeNotDesignatedControls();
                selection_reference = formFactory
index 7cac1ee09fbafcb945709466ff06e0e798e9cd7b..5febc16a1d51bfc3c0d41f0fe38c701565e92c99 100644 (file)
@@ -93,7 +93,7 @@ public class NameTypeDesignationElement extends
                     combo_typeStatus.setSelection(entity.getTypeStatus());
                     return;
                 }
-                   }else if ( entity.getTypeStatus() != null && getEntity().getTypeStatus().isLectotype() && !combo_typeStatus.getSelection().isLectotype() && entity.getCitation() != null){
+                   }else if ( entity.getTypeStatus() != null && getEntity().getTypeStatus().hasDesignationSource() && !combo_typeStatus.getSelection().hasDesignationSource() && entity.getCitation() != null){
                        boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
                 if (!ok){
                     combo_typeStatus.setSelection(entity.getTypeStatus());
index 7aec71b91796be0a7209089e05d65a97e79570ae..8eee910db6e7622fa2c1e9f46ffcdebc278412a1 100644 (file)
@@ -81,7 +81,7 @@ public class SpecimenTypeDesignationElement extends
            super.handleEvent(eventSource);
                if (eventSource == combo_typeStatus) {
 
-                   if ((combo_typeStatus.getSelection() == null && entity.getCitation() != null) || ( 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().hasDesignationSource() && !combo_typeStatus.getSelection().hasDesignationSource() && entity.getCitation() != null)){
                        boolean ok = MessagingUtils.confirmDialog(Messages.NameTypeDesignationElement_4, Messages.NameTypeDesignationElement_5);
                        if (!ok){
                            combo_typeStatus.setSelection(entity.getTypeStatus());