X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fui%2Fviewers%2FSection.java;h=88585e18506844551527d98f29b96db63459337a;hb=cfb85fdcbe328fe43164eda3b19bcfeb309ad24f;hp=730ba671d71def6011c3d025a8beed39fb8cc58b;hpb=740f861dfbc166c70d206b3469ed7c8a645751c7;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/ui/viewers/Section.java b/org.argeo.cms.ui/src/org/argeo/cms/ui/viewers/Section.java index 730ba671d..88585e185 100644 --- a/org.argeo.cms.ui/src/org/argeo/cms/ui/viewers/Section.java +++ b/org.argeo.cms.ui/src/org/argeo/cms/ui/viewers/Section.java @@ -106,13 +106,20 @@ public class Section extends JcrComposite { public SectionPart nextSectionPart(SectionPart sectionPart) { Control[] children = getChildren(); for (int i = 0; i < children.length; i++) { - if (sectionPart == children[i]) - if (i + 1 < children.length) { - Composite next = (Composite) children[i + 1]; - return (SectionPart) next; - } else { - // next section + if (sectionPart == children[i]) { + for (int j = i + 1; j < children.length; j++) { + if (children[i + 1] instanceof SectionPart) { + return (SectionPart) children[i + 1]; + } } + +// if (i + 1 < children.length) { +// Composite next = (Composite) children[i + 1]; +// return (SectionPart) next; +// } else { +// // next section +// } + } } return null; }