From 9e44d75d4bbc2f4690bbd154edfc65a67301a831 Mon Sep 17 00:00:00 2001 From: Katja Luther Date: Tue, 7 Nov 2017 14:59:42 +0100 Subject: [PATCH] fix #6974: set vocUUid at the beginning to the uuid of the preselected vocabulary --- ...ortFromFileAndChooseVocIdWizardPageE4.java | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/ImportFromFileAndChooseVocIdWizardPageE4.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/ImportFromFileAndChooseVocIdWizardPageE4.java index b8d4178d2..c59ef260b 100755 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/ImportFromFileAndChooseVocIdWizardPageE4.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/e4/in/ImportFromFileAndChooseVocIdWizardPageE4.java @@ -66,25 +66,36 @@ public class ImportFromFileAndChooseVocIdWizardPageE4 extends ImportFromFileData } getLabelAndValues(vocs); vocabularyCombo.select(0); + setVocUuidFromVocCombo(); vocabularyCombo.addSelectionListener(new SelectionAdapter(){ @Override public void widgetSelected(SelectionEvent e) { String name = vocabularyCombo.getText(); - - for (String[] labelAndValue: labelAndValues){ - if (labelAndValue[0].equals(name)){ - String uuidString = labelAndValue[1]; - vocUuid = UUID.fromString(uuidString); - setPageComplete(isPageComplete()); - } + setVocUuidFromVocCombo(); + if (vocUuid != null){ + setPageComplete(isPageComplete()); } - } }); } + /** + * @return + */ + private void setVocUuidFromVocCombo() { + String name = vocabularyCombo.getText(); + + for (String[] labelAndValue: labelAndValues){ + if (labelAndValue[0].equals(name)){ + String uuidString = labelAndValue[1]; + vocUuid = UUID.fromString(uuidString); + } + } + + } + public UUID getVocUuid() { return vocUuid; } -- 2.34.1