Revision 2e94319e
Added by Andreas Kohlbecker over 10 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeAcceptedTaxonToSynonymHandler.java | ||
---|---|---|
54 | 54 |
Page.NAME); |
55 | 55 |
TaxonNode oldAcceptedTaxonNode = ((TaxonEditorInput) editor.getEditorInput()).getTaxonNode(); |
56 | 56 |
|
57 |
// check if taxon has no children |
|
58 |
if(oldAcceptedTaxonNode.getCountChildren() > 0) { |
|
59 |
EditorUtil.warningDialog("Prerequisite not met", this, |
|
60 |
"The accepted taxon must not have any childen. You need to move all childen to " + |
|
61 |
"another taxon node in the TaxonNavigator before attempting to turn the accepted " + |
|
62 |
"taxon into a synonym."); |
|
63 |
return null; |
|
64 |
} |
|
65 |
|
|
57 | 66 |
// Choose new accepted taxon |
58 | 67 |
List<UUID> excludeTaxa = new ArrayList<UUID>(); |
59 | 68 |
excludeTaxa.add(oldAcceptedTaxonNode.getUuid()); |
Also available in: Unified diff
fixing #3793 (do not allow to turn an accepted taxon into a synonym as long the accepted taxon still has children)