- fixed adding of child to parent ICdmFormElement in else clause
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmFormFactory.java
index 6eb6dd8384a586311c2bd7eb9caecb93d9b56fb8..123f5f564a0822e5305b57a4c0fbc2e31b1fecd2 100644 (file)
@@ -2590,8 +2590,10 @@ public class CdmFormFactory extends FormToolkit {
                             + entity, null);
         }
 
-        else if (backgroundColor != null && !backgroundColor.isDisposed()) {
-            element.setPersistentBackground(backgroundColor);
+        else{
+            if (backgroundColor != null && !backgroundColor.isDisposed()) {
+                element.setPersistentBackground(backgroundColor);
+            }
             adapt(element);
             parentElement.addElement(element);
         }