ref #10202: disable reference or specimen selection
authorKatja Luther <k.luther@bgbm.org>
Wed, 21 Dec 2022 09:08:27 +0000 (10:08 +0100)
committerKatja Luther <k.luther@bgbm.org>
Wed, 21 Dec 2022 09:08:27 +0000 (10:08 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/DescriptionElementSourceElement.java

index 89909930c704dfc08775fa3a38de7c9f7a0a5e15..28b5060a80bedf7529f70a3f66d7b229b56499d1 100644 (file)
@@ -84,6 +84,10 @@ public class DescriptionElementSourceElement extends
                        combo_origsourcetype.setSelection(entity.getType());
                        externalLinks.setEntity(entity);
                }
+               if (selection_specimen != null) {
+                       selection_specimen.setEnabled(selection_reference.getEntity()== null);
+                       selection_reference.setEnabled(selection_specimen.getEntity()== null);
+               }
        }
 
        @Override
@@ -110,6 +114,10 @@ public class DescriptionElementSourceElement extends
        public void setEnabled(boolean enabled) {
                super.setEnabled(enabled);
                externalLinks.setEnabled(isEnabled);
+               if (selection_specimen != null) {
+                       selection_specimen.setEnabled(selection_reference.getEntity()== null);
+                       selection_reference.setEnabled(selection_specimen.getEntity()== null);
+               }
        }
         
 }
\ No newline at end of file