From 1d6463ca297a8bcf0a88f92259f76742efa50a70 Mon Sep 17 00:00:00 2001 From: Katja Luther Date: Mon, 4 Jul 2016 15:20:35 +0200 Subject: [PATCH] #4018: don't allow to finish, if no language is selected, quick fix --- .../ui/section/vocabulary/TermTranslationWizard.java | 5 ++++- .../taxeditor/ui/translation/TranslationWizard.java | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java index d10192048..37d7385d0 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/TermTranslationWizard.java @@ -53,7 +53,10 @@ public class TermTranslationWizard extends Wizard { @Override public boolean performFinish() { Representation representation = page.getTargetRepresentation(); - + + if (representation.getLanguage() == null){ + return false; + } if (!representation.getText().equals("") || !representation.getLabel().equals("") || !representation.getAbbreviatedLabel().equals("")) { term.addRepresentation(representation); } diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java index 93c48b11f..18a51060e 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizard.java @@ -59,6 +59,9 @@ public class TranslationWizard extends Wizard { public boolean performFinish() { LanguageString languageString = page.getTargetLanguageString(); + if (languageString.getLanguage() == null){ + return false; + } if (!languageString.getText().equals("")) { multilanguageText.put(languageString.getLanguage(), languageString); } -- 2.34.1