Revision ffd20969
Added by Katja Luther over 4 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TaxonNavigatorE4.java | ||
---|---|---|
298 | 298 |
if (editor instanceof TaxonNameEditorE4){ |
299 | 299 |
taxonNode = new TaxonNodeDto( ((TaxonNameEditorE4)editor).getEditorInput().getTaxonNode()); |
300 | 300 |
}else{ |
301 |
taxonNode = new TaxonNodeDto(editor.getTaxon().getTaxonNodes().iterator().next()); |
|
301 |
if (editor.getTaxon().getTaxonNodes() != null && !editor.getTaxon().getTaxonNodes().isEmpty()){ |
|
302 |
taxonNode = new TaxonNodeDto(editor.getTaxon().getTaxonNodes().iterator().next()); |
|
303 |
} |
|
302 | 304 |
} |
305 |
|
|
303 | 306 |
viewer.reveal(taxonNode); |
304 | 307 |
viewer.setSelection(new StructuredSelection(taxonNode)); |
305 | 308 |
} |
Also available in: Unified diff
fix NoSuchElementException for taxa without nodes