X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=swt%2Forg.argeo.cms.swt%2Fsrc%2Forg%2Fargeo%2Fcms%2Fswt%2Facr%2FSwtSection.java;h=f4f5961ca7c22530907c36800c5821a2a64ee587;hb=3b45f571938e0eb6803084aac3f2bd298e6026ba;hp=57c4da00ce0ea502442080051655c779d8d41d48;hpb=d2bca81ff63496bf1d879f4cbcd6a531f598e69c;p=lgpl%2Fargeo-commons.git diff --git a/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/acr/SwtSection.java b/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/acr/SwtSection.java index 57c4da00c..f4f5961ca 100644 --- a/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/acr/SwtSection.java +++ b/swt/org.argeo.cms.swt/src/org/argeo/cms/swt/acr/SwtSection.java @@ -27,10 +27,14 @@ public class SwtSection extends ContentComposite { this(section, section, style, node); } + public SwtSection(SwtSection section, int style) { + this(section, style, null); + } + protected SwtSection(Composite parent, SwtSection parentSection, int style, Content node) { super(parent, style, node); this.parentSection = parentSection; - if (parentSection != null) { + if (parentSection != null && hasContent() && parentSection.hasContent()) { relativeDepth = getProvidedContent().getDepth() - parentSection.getProvidedContent().getDepth(); } else { relativeDepth = 0;