Project

General

Profile

Revision f808cb88

IDf808cb88044de0e34896da6613d8020c7bd12338
Parent a77e70cf
Child c0292658

Added by Katja Luther 9 months ago

ref #7809: check if inverse representation is null instead of label

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/NameRelationshipTypeCombo.java
17 17
import org.eclipse.swt.SWT;
18 18
import org.eclipse.swt.events.SelectionEvent;
19 19

  
20
import eu.etaxonomy.cdm.model.common.Language;
21
import eu.etaxonomy.cdm.model.common.Representation;
20 22
import eu.etaxonomy.cdm.model.common.TermType;
21 23
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
22 24
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
......
103 105
    private void fillInverseTermWrapperList() {
104 106
        for (NameRelationshipType term: terms){
105 107
            wrapperList.add(new InverseTermWrapper(term, false, useAbbrevLabel));
106
            if (term.getInverseLabel(CdmStore.getDefaultLanguage()) != null && !term.getInverseLabel(CdmStore.getDefaultLanguage()).equals(term.getLabel(CdmStore.getDefaultLanguage()))){
108
            List<Language> languages = new ArrayList();
109
            languages.add(CdmStore.getDefaultLanguage());
110
            Representation rep = term.getPreferredInverseRepresentation(languages);
111

  
112
            if (rep != null && !rep.getLabel().equals(term.getLabel(CdmStore.getDefaultLanguage()))){
107 113
                wrapperList.add(new InverseTermWrapper(term, true, useAbbrevLabel));
108 114
            }
109 115
        }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)