Merge branch 'release/5.32.0'
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / TextTypeDesignationElement.java
index 4c97c785ca74c801f4829de46f5b5692678ad097..f5b88c580ab9b0b7e244acc4032de22128a34316 100644 (file)
@@ -6,7 +6,6 @@
  * The contents of this file are subject to the Mozilla Public License Version 1.1
  * See LICENSE.TXT at the top of this package for the full license terms.
  */
-
 package eu.etaxonomy.taxeditor.ui.section.name;
 
 import org.eclipse.jface.util.PropertyChangeEvent;
@@ -21,13 +20,11 @@ import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
 import eu.etaxonomy.taxeditor.ui.element.MultilanguageTextElement;
 
 /**
- *
  * @author pplitzner
  * @since May 15, 2019
- *
  */
-public class TextTypeDesignationElement extends
-               AbstractTypeDesignationElement<TextualTypeDesignation> {
+public class TextTypeDesignationElement
+        extends AbstractTypeDesignationElement<TextualTypeDesignation> {
 
     private MultilanguageTextElement multilanguageTextElement;
     private CheckboxElement checkIsVerbatim;
@@ -40,9 +37,12 @@ public class TextTypeDesignationElement extends
 
        @Override
        public void createControls(ICdmFormElement formElement, int style) {
-        multilanguageTextElement = formFactory.createMultiLanguageTextElement(this, null, entity.getText(), 200, SWT.WRAP);
+        multilanguageTextElement = formFactory.createMultiLanguageTextElement(this, null, entity.getText(), 100, SWT.WRAP);
         checkIsVerbatim = formFactory.createCheckbox(formElement, "Is Verbatim", getEntity().isVerbatim(), style);
-               super.createControls(formElement, style);
+        super.createControls(formElement, style);
+        if (entity != null){
+               setEntity(entity);
+        }
        }
 
     @Override
@@ -57,6 +57,9 @@ public class TextTypeDesignationElement extends
        @Override
        public void setEntity(TextualTypeDesignation entity) {
            super.setEntity(entity);
+           if (checkbox_notDesignated != null){
+               removeNotDesignatedControls();
+           }
        }
 
        @Override
@@ -66,4 +69,4 @@ public class TextTypeDesignationElement extends
                getEntity().setVerbatim(checkIsVerbatim.getSelection());
            }
        }
-}
+}
\ No newline at end of file