Project

General

Profile

« Previous | Next » 

Revision aa95aad0

Added by Patrick Plitzner over 5 years ago

fix #7868 Allow creating a new vocabulary in vocabulary selection dialog

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/AbstractTermBaseDetailElement.java
10 10

  
11 11
import org.eclipse.swt.widgets.Button;
12 12

  
13
import eu.etaxonomy.cdm.model.common.Language;
13 14
import eu.etaxonomy.cdm.model.common.Representation;
14 15
import eu.etaxonomy.cdm.model.common.TermBase;
15 16
import eu.etaxonomy.cdm.model.common.TermVocabulary;
......
59 60
        else if (eventSource == element_Representation) {
60 61
            Representation selectedRepresentation = element_Representation.getSelectedRepresentation();
61 62
            if(selectedRepresentation!=null){
62
                getEntity().setLabel(selectedRepresentation.getLabel(),  selectedRepresentation.getLanguage());
63
                getEntity().getRepresentation(selectedRepresentation.getLanguage()).setAbbreviatedLabel(selectedRepresentation.getAbbreviatedLabel());
64
                getEntity().getRepresentation(selectedRepresentation.getLanguage()).setText(selectedRepresentation.getDescription());
63
                Language representationLanguage = selectedRepresentation.getLanguage();
64
                if(representationLanguage==null){
65
                    representationLanguage = Language.getDefaultLanguage();
66
                }
67
                getEntity().setLabel(selectedRepresentation.getLabel(),  representationLanguage);
68
                getEntity().getRepresentation(representationLanguage).setAbbreviatedLabel(selectedRepresentation.getAbbreviatedLabel());
69
                getEntity().getRepresentation(representationLanguage).setText(selectedRepresentation.getDescription());
65 70
            }
66 71
            getEntity().setTitleCache(null);
67 72
        }

Also available in: Unified diff